mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 09:59:18 +01:00
add overridable locking functions
This commit is contained in:
parent
7f396f52d4
commit
fd85021971
29
source/lock.c
Normal file
29
source/lock.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include "common.h"
|
||||
|
||||
#ifndef USE_LWP_LOCK
|
||||
|
||||
#ifndef mutex_t
|
||||
typedef int mutex_t;
|
||||
#endif
|
||||
|
||||
void __attribute__ ((weak)) _FAT_lock_init(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void __attribute__ ((weak)) _FAT_lock_deinit(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void __attribute__ ((weak)) _FAT_lock(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void __attribute__ ((weak)) _FAT_unlock(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endif // USE_LWP_LOCK
|
@ -60,25 +60,10 @@ static inline void _FAT_unlock(mutex_t *mutex)
|
||||
typedef int mutex_t;
|
||||
#endif
|
||||
|
||||
static inline void _FAT_lock_init(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void _FAT_lock_deinit(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void _FAT_lock(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void _FAT_unlock(mutex_t *mutex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
void _FAT_lock_init(mutex_t *mutex);
|
||||
void _FAT_lock_deinit(mutex_t *mutex);
|
||||
void _FAT_lock(mutex_t *mutex);
|
||||
void _FAT_unlock(mutex_t *mutex);
|
||||
|
||||
#endif // USE_LWP_LOCK
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user