mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-26 15:58:41 +00:00
Added SDL_GetThreadState
This commit is contained in:
parent
b7dac5072b
commit
ca4f5dd40d
6 changed files with 39 additions and 8 deletions
|
|
@ -456,6 +456,11 @@ void SDL_WaitThread(SDL_Thread *thread, int *status)
|
|||
}
|
||||
}
|
||||
|
||||
SDL_ThreadState SDL_GetThreadState(SDL_Thread *thread)
|
||||
{
|
||||
return (SDL_ThreadState)SDL_GetAtomicInt(&thread->state);
|
||||
}
|
||||
|
||||
void SDL_DetachThread(SDL_Thread *thread)
|
||||
{
|
||||
if (!thread) {
|
||||
|
|
|
|||
|
|
@ -44,14 +44,6 @@
|
|||
#endif
|
||||
#include "../SDL_error_c.h"
|
||||
|
||||
typedef enum SDL_ThreadState
|
||||
{
|
||||
SDL_THREAD_STATE_ALIVE,
|
||||
SDL_THREAD_STATE_DETACHED,
|
||||
SDL_THREAD_STATE_ZOMBIE,
|
||||
SDL_THREAD_STATE_CLEANED,
|
||||
} SDL_ThreadState;
|
||||
|
||||
// This is the system-independent thread info structure
|
||||
struct SDL_Thread
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue