1 /*------------------------------------------------------------------------*/ 2 /* OS Dependent Functions for FatFs */ 3 /* (C)ChaN, 2018 */ 4 /*------------------------------------------------------------------------*/ 5 6 7 #include "ff.h" 8 #include <stdlib.h> 9 10 /* This is the implementation for host-side testing on Linux. 11 * Host-side tests are single threaded, so lock functionality isn't needed. 12 */ 13 ff_memalloc(UINT msize)14void* ff_memalloc(UINT msize) 15 { 16 return malloc(msize); 17 } 18 ff_memfree(void * mblock)19void ff_memfree(void* mblock) 20 { 21 free(mblock); 22 } 23 24 /* 1:Function succeeded, 0:Could not create the sync object */ ff_cre_syncobj(BYTE vol,FF_SYNC_t * sobj)25int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj) 26 { 27 *sobj = NULL; 28 return 1; 29 } 30 31 /* 1:Function succeeded, 0:Could not delete due to an error */ ff_del_syncobj(FF_SYNC_t sobj)32int ff_del_syncobj(FF_SYNC_t sobj) 33 { 34 return 1; 35 } 36 37 /* 1:Function succeeded, 0:Could not acquire lock */ ff_req_grant(FF_SYNC_t sobj)38int ff_req_grant (FF_SYNC_t sobj) 39 { 40 return 1; 41 } 42 ff_rel_grant(FF_SYNC_t sobj)43void ff_rel_grant (FF_SYNC_t sobj) 44 { 45 } 46