mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
dataqueue: Make thread safe.
Each data queue gets its own mutex and each function obtains it.
Fixes #7390.
(cherry picked from commit 8b9a938413)
This commit is contained in:
@@ -33,6 +33,7 @@ int SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *data, const size_t le
|
||||
size_t SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *buf, const size_t len);
|
||||
size_t SDL_PeekIntoDataQueue(SDL_DataQueue *queue, void *buf, const size_t len);
|
||||
size_t SDL_CountDataQueue(SDL_DataQueue *queue);
|
||||
SDL_mutex *SDL_GetDataQueueMutex(SDL_DataQueue *queue); /* don't destroy this, obviously. */
|
||||
|
||||
#endif /* SDL_dataqueue_h_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user