Mercurial > sdl-ios-xcode
diff include/SDL_thread.h @ 1895:c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jul 2006 21:04:37 +0000 |
parents | d5d3a6fe05a1 |
children | 5f6550e5184f |
line wrap: on
line diff
--- a/include/SDL_thread.h Thu Jul 06 18:01:37 2006 +0000 +++ b/include/SDL_thread.h Mon Jul 10 21:04:37 2006 +0000 @@ -23,10 +23,11 @@ #ifndef _SDL_thread_h #define _SDL_thread_h -/* Header for the SDL thread management routines - - These are independent of the other SDL routines. -*/ +/** + * \file SDL_thread.h + * + * Header for the SDL thread management routines + */ #include "SDL_stdinc.h" #include "SDL_error.h" @@ -37,7 +38,9 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus +/* *INDENT-OFF* */ extern "C" { +/* *INDENT-ON* */ #endif /* The SDL thread structure, defined in SDL_thread.c */ @@ -61,25 +64,39 @@ */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD #ifndef _WIN32_WCE -#include <process.h> /* This has _beginthread() and _endthread() defined! */ +#include <process.h> /* This has _beginthread() and _endthread() defined! */ #endif #ifdef __OS2__ -typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg); -typedef void (*pfnSDL_CurrentEndThread)(void); +typedef int (*pfnSDL_CurrentBeginThread) (void (*func) (void *), void *, + unsigned, void *arg); +typedef void (*pfnSDL_CurrentEndThread) (void); #elif __GNUC__ -typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall *func)(void *), void *arg, - unsigned, unsigned *threadID); -typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code); +typedef unsigned long (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, + unsigned + (__stdcall * + func) (void *), + void *arg, + unsigned, + unsigned + *threadID); +typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); #else -typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall *func)(void *), void *arg, - unsigned, unsigned *threadID); -typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code); +typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, + unsigned (__stdcall * + func) (void + *), + void *arg, unsigned, + unsigned *threadID); +typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); #endif -extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread); +extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *), + void *data, + pfnSDL_CurrentBeginThread + pfnBeginThread, + pfnSDL_CurrentEndThread + pfnEndThread); #ifdef __OS2__ #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread) @@ -89,7 +106,8 @@ #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthreadex, _endthreadex) #endif #else -extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data); +extern DECLSPEC SDL_Thread *SDLCALL +SDL_CreateThread(int (SDLCALL * fn) (void *), void *data); #endif /* Get the 32-bit thread identifier for the current thread */ @@ -98,22 +116,26 @@ /* Get the 32-bit thread identifier for the specified thread, equivalent to SDL_ThreadID() if the specified thread is NULL. */ -extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread *thread); +extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread * thread); /* Wait for a thread to finish. The return code for the thread function is placed in the area pointed to by 'status', if 'status' is not NULL. */ -extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status); +extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); /* Forcefully kill a thread without worrying about its state */ -extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread *thread); +extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread * thread); /* Ends C function definitions when using C++ */ #ifdef __cplusplus +/* *INDENT-OFF* */ } +/* *INDENT-ON* */ #endif #include "close_code.h" #endif /* _SDL_thread_h */ + +/* vi: set ts=4 sw=4 expandtab: */