blob: 109957bbcbb17cdd283a36144d05ee3b41cbe9ec [file] [log] [blame]
Flemmard0604a8e2013-05-23 16:15:48 -07001/*
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
24void *MLOSMalloc(unsigned int numBytes)
25{
26 return kmalloc(numBytes, GFP_KERNEL);
27}
28
29tMLError MLOSFree(void *ptr)
30{
31 kfree(ptr);
32 return ML_SUCCESS;
33}
34
35tMLError MLOSCreateMutex(HANDLE *mutex)
36{
37
38 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
39}
40
41tMLError MLOSLockMutex(HANDLE mutex)
42{
43
44 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
45}
46
47tMLError MLOSUnlockMutex(HANDLE mutex)
48{
49
50 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
51}
52
53tMLError MLOSDestroyMutex(HANDLE handle)
54{
55
56 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
57}
58
59FILE *MLOSFOpen(char *filename)
60{
61
62 return NULL;
63}
64
65void MLOSFClose(FILE *fp)
66{
67
68}
69
70void MLOSSleep(int mSecs)
71{
Ethan Chen4b3870c2014-01-18 00:38:44 -080072 hr_msleep(mSecs);
Flemmard0604a8e2013-05-23 16:15:48 -070073}
74
75unsigned long MLOSGetTickCount(void)
76{
77
78 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
79}