mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-01 11:34:40 +00:00
N3DS: Semaphore fixes. (#6776)
* N3DS: Make Sem waits cooperative friendly. The 3DS has a cooperative threading model. Sleeping after TryWait and WaitTimeout avoid starving other threads. It inccurs a runtime penalty, but it's better than having to hard reset your console to recover from a deadlock.
This commit is contained in:
@@ -25,3 +25,4 @@ cmake --install build
|
||||
- SDL3_main should be used to ensure ROMFS is enabled.
|
||||
- By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
|
||||
- `SDL_GetBasePath` returns the romfs root instead of the executable's directory.
|
||||
- The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information.
|
||||
|
||||
Reference in New Issue
Block a user