Closed xerpi closed 1 year ago
The first argument is the handle of the thread that is currently holding the lock, not our own thread handle. The third argument is our own tag. This tag is the value that is supposed to be our own thread handle, which is retrieved a bit earlier: https://github.com/switchbrew/libnx/blob/master/nx/source/kernel/mutex.c#L34C5-L34C38
The first argument is the handle of the thread that is currently holding the lock, not our own thread handle. The third argument is our own tag. This tag is the value that is supposed to be our own thread handle, which is retrieved a bit earlier: https://github.com/switchbrew/libnx/blob/master/nx/source/kernel/mutex.c#L34C5-L34C38
That makes more sense, thanks for the explanation!
1st (thread handle) and 3rd (tag) arguments were swapped.