LWP_MutexLock always returns error

Post Reply
Posts: 1
Joined: Tue Jun 09, 2020 4:29 pm

LWP_MutexLock always returns error

Post by shenglee » Tue Jun 09, 2020 4:50 pm

I'm trying to port a game that uses SDL to the Wii. Using sdl-wii I managed to port other software (e.g. emulators) without too much trouble. In this case, however, I'm having trouble with mutexes. The implementation of sdl-wii calls LWP_MutexLock to lock a mutex but it always returns an error code (-1). The mutex is initialized previously with LWP_MutexInit, but I don't know if there are other initialization steps that are necessary. I've taken a look at the code for LWP_MutexLock and other mutex operations in libogc but it didn't help me much.

Does anyone have an idea why this is happening? Otherwise, is there any further documentation or examples using threads and mutexes with devkitPPC? Thanks.

Site Admin
Posts: 1478
Joined: Tue Aug 09, 2005 3:21 am
Location: UK

Re: LWP_MutexLock always returns error

Post by WinterMute » Mon Jun 22, 2020 7:59 pm

It's not clear if your problem is with SDL or with LWP mutexes here. Can you supply some code snippets by any chance?

We also finally got around to collating a few SDL ports and updating SDL's configury for Wii & Gamecube support so we now have official SDL packages available via pacman. It would be nice if you could test your ports with those packages and let is know if you find any problems. We do recommend removing the libogc, portlibs/wii, portlibs/gamecube and portlibs/ppc folders before reinstalling the official packages you need. Unfortunately libraries provided elsewhere are likely to cause issues.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests