File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,22 +120,24 @@ void rc_mutex_unlock(rc_mutex_t* mutex)
120120
121121void rc_mutex_init (rc_mutex_t * mutex )
122122{
123- LWP_MutexInit (mutex , NULL );
123+ /* LWP_MutexInit has the handle passed by reference */
124+ /* Other LWP_Mutex* calls have the handle passed by value */
125+ LWP_MutexInit (& mutex -> handle , 1 );
124126}
125127
126128void rc_mutex_destroy (rc_mutex_t * mutex )
127129{
128- LWP_MutexDestroy (mutex );
130+ LWP_MutexDestroy (mutex -> handle );
129131}
130132
131133void rc_mutex_lock (rc_mutex_t * mutex )
132134{
133- LWP_MutexLock (mutex );
135+ LWP_MutexLock (mutex -> handle );
134136}
135137
136138void rc_mutex_unlock (rc_mutex_t * mutex )
137139{
138- LWP_MutexUnlock (mutex );
140+ LWP_MutexUnlock (mutex -> handle );
139141}
140142
141143#elif defined(_3DS )
Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ RC_BEGIN_C_DECLS
8181 typedef struct rc_mutex_t {
8282 void * handle ; /* HANDLE is defined as "void*" */
8383 } rc_mutex_t ;
84+ #elif defined(GEKKO )
85+ #include <ogcsys.h>
86+ typedef struct rc_mutex_t {
87+ mutex_t handle ;
88+ } rc_mutex_t ;
8489 #elif defined(_3DS )
8590 #include <3ds/synchronization.h>
8691 typedef RecursiveLock rc_mutex_t ;
You can’t perform that action at this time.
0 commit comments