include/SDL_thread.h
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1471 9fb0eee04dd9
child 1668 4da1ee79c9af
--- a/include/SDL_thread.h	Sun May 21 17:27:13 2006 +0000
+++ b/include/SDL_thread.h	Sun May 28 13:04:16 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 (*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,31 +106,37 @@
 #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 */
-extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
+extern DECLSPEC Uint32 SDLCALL SDL_ThreadID (void);
 
 /* 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: */