| Video | Events | Audio | CD-ROM | Threads |
In general, you must be very aware of concurrency and data integrity issues
when writing multi-threaded programs. Some good guidelines include:
Without any further ado:
Defined in
Get the 32-bit thread identifier for the current thread
Defined in
Wait for a thread to finish (timeouts are not supported).
Defined in
Defined in
Returns a new mutex, initially unlocked, or
Defined in
Locks a mutex, returning 
extern SDL_Thread *SDL_CreateThread(int (*fn)(void *), void *data);
SDL_thread.h
SDL_CreateThread() creates a new thread of execution that shares
all of its parent's global memory, signal handlers, file descriptors, etc,
and runs the function 'fn' passed the void pointer
'data'. The thread quits when this function returns.

extern Uint32 SDL_ThreadID(void);

extern void SDL_WaitThread(SDL_Thread *thread, int *status);
SDL_thread.h
The return code for the thread function is placed in the area pointed to by
'status', if 'status' is not
NULL.

extern void SDL_KillThread(SDL_Thread *thread);
SDL_thread.h
SDL_KillThread() gracelessly terminates the thread associated
with 'thread'. If possible, you should use some other
form of IPC to signal the thread to quit.

extern SDL_mutex *SDL_CreateMutex(void);
SDL_mutex.h
NULL on error.

extern int SDL_mutexP(SDL_mutex *mutex);
SDL_mutex.h
0, or -1 on error.