| Flemmard | 0604a8e | 2013-05-23 16:15:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | $License: |
| 3 | Copyright (C) 2010 InvenSense Corporation, All Rights Reserved. |
| 4 | |
| 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation; either version 2 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | This program is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | $ |
| 18 | */ |
| 19 | |
| 20 | #include "mlos.h" |
| 21 | #include <linux/delay.h> |
| 22 | #include <linux/slab.h> |
| 23 | |
| 24 | void *MLOSMalloc(unsigned int numBytes) |
| 25 | { |
| 26 | return kmalloc(numBytes, GFP_KERNEL); |
| 27 | } |
| 28 | |
| 29 | tMLError MLOSFree(void *ptr) |
| 30 | { |
| 31 | kfree(ptr); |
| 32 | return ML_SUCCESS; |
| 33 | } |
| 34 | |
| 35 | tMLError MLOSCreateMutex(HANDLE *mutex) |
| 36 | { |
| 37 | |
| 38 | return ML_ERROR_FEATURE_NOT_IMPLEMENTED; |
| 39 | } |
| 40 | |
| 41 | tMLError MLOSLockMutex(HANDLE mutex) |
| 42 | { |
| 43 | |
| 44 | return ML_ERROR_FEATURE_NOT_IMPLEMENTED; |
| 45 | } |
| 46 | |
| 47 | tMLError MLOSUnlockMutex(HANDLE mutex) |
| 48 | { |
| 49 | |
| 50 | return ML_ERROR_FEATURE_NOT_IMPLEMENTED; |
| 51 | } |
| 52 | |
| 53 | tMLError MLOSDestroyMutex(HANDLE handle) |
| 54 | { |
| 55 | |
| 56 | return ML_ERROR_FEATURE_NOT_IMPLEMENTED; |
| 57 | } |
| 58 | |
| 59 | FILE *MLOSFOpen(char *filename) |
| 60 | { |
| 61 | |
| 62 | return NULL; |
| 63 | } |
| 64 | |
| 65 | void MLOSFClose(FILE *fp) |
| 66 | { |
| 67 | |
| 68 | } |
| 69 | |
| 70 | void MLOSSleep(int mSecs) |
| 71 | { |
| Ethan Chen | 4b3870c | 2014-01-18 00:38:44 -0800 | [diff] [blame] | 72 | hr_msleep(mSecs); |
| Flemmard | 0604a8e | 2013-05-23 16:15:48 -0700 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | unsigned long MLOSGetTickCount(void) |
| 76 | { |
| 77 | |
| 78 | return ML_ERROR_FEATURE_NOT_IMPLEMENTED; |
| 79 | } |