Added missing &

This commit is contained in:
Maschell 2017-09-10 12:13:08 +02:00
parent bb10015e70
commit 8506269613
2 changed files with 39 additions and 2 deletions

View File

@ -51,6 +51,43 @@ static inline void _NTFS_unlock(mutex_t *mutex)
{
LWP_MutexUnlock(*mutex);
}
/* //not working.
#elif defined(__wiiu__)
#ifndef mutex_t
typedef int mutex_t;
#endif
#define OS_MUTEX_SIZE 44
extern void (* OSInitMutex)(void* mutex);
extern void (* OSLockMutex)(void* mutex);
extern void (* OSUnlockMutex)(void* mutex);
extern void (* OSFatal)(const char *msg);
static inline void _NTFS_lock_init(mutex_t *mutex,int unkwn){
void* new_mutex = malloc(OS_MUTEX_SIZE);
if(new_mutex == NULL){
OSFatal("_NTFS_lock_init malloc fail");
}
*mutex = (mutex_t) new_mutex;
OSInitMutex(new_mutex);
}
static inline void _NTFS_lock_deinit(mutex_t *mutex){
free((void*)(*mutex));
*mutex = 0;
}
static inline void _NTFS_lock(mutex_t *mutex)
{
OSLockMutex((void*)*mutex);
}
static inline void _NTFS_unlock(mutex_t *mutex)
{
OSUnlockMutex((void*)*mutex);
}*/
#else

View File

@ -152,13 +152,13 @@ typedef struct _ntfs_vd {
/* Lock volume */
static inline void ntfsLock (ntfs_vd *vd)
{
_NTFS_lock((mutex_t *)vd->lock);
_NTFS_lock((mutex_t *)&vd->lock);
}
/* Unlock volume */
static inline void ntfsUnlock (ntfs_vd *vd)
{
_NTFS_unlock((mutex_t *)vd->lock);
_NTFS_unlock((mutex_t *)&vd->lock);
}
/* Gekko device related routines */