blob: 380a201477a60c3d6d43b76bb73a1f4d1be3d0ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*------------------------------------------------------------------------*/
/* OS Dependent Functions for FatFs */
/* (C)ChaN, 2018 */
/*------------------------------------------------------------------------*/
#include "ff.h"
#include <stdlib.h>
/* This is the implementation for host-side testing on Linux.
* Host-side tests are single threaded, so lock functionality isn't needed.
*/
void* ff_memalloc(UINT msize)
{
return malloc(msize);
}
void ff_memfree(void* mblock)
{
free(mblock);
}
static int* Mutex[FF_VOLUMES + 1]; /* Table of mutex handle */
/* 1:Function succeeded, 0:Could not create the mutex */
int ff_mutex_create(int vol)
{
Mutex[vol] = NULL;
return 1;
}
void ff_mutex_delete(int vol)
{
}
/* 1:Function succeeded, 0:Could not acquire lock */
int ff_mutex_take(int vol)
{
return 1;
}
void ff_mutex_give(int vol)
{
}
|