Mercurial > sdl-ios-xcode
comparison include/SDL_thread.h @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children |
comparison
equal
deleted
inserted
replaced
1667:1fddae038bc8 | 1668:4da1ee79c9af |
---|---|
80 unsigned, | 80 unsigned, |
81 unsigned | 81 unsigned |
82 *threadID); | 82 *threadID); |
83 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); | 83 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); |
84 #else | 84 #else |
85 typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, | 85 typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, |
86 unsigned (__stdcall * | 86 unsigned (__stdcall * |
87 func) (void | 87 func) (void |
88 *), | 88 *), |
89 void *arg, unsigned, | 89 void *arg, unsigned, |
90 unsigned *threadID); | 90 unsigned *threadID); |
91 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); | 91 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); |
92 #endif | 92 #endif |
93 | 93 |
94 extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread (int (*fn) (void *), | 94 extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *), |
95 void *data, | 95 void *data, |
96 pfnSDL_CurrentBeginThread | 96 pfnSDL_CurrentBeginThread |
97 pfnBeginThread, | 97 pfnBeginThread, |
98 pfnSDL_CurrentEndThread | 98 pfnSDL_CurrentEndThread |
99 pfnEndThread); | 99 pfnEndThread); |
100 | 100 |
101 #ifdef __OS2__ | 101 #ifdef __OS2__ |
102 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread) | 102 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread) |
103 #elif defined(_WIN32_WCE) | 103 #elif defined(_WIN32_WCE) |
104 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, NULL, NULL) | 104 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, NULL, NULL) |
105 #else | 105 #else |
106 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthreadex, _endthreadex) | 106 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthreadex, _endthreadex) |
107 #endif | 107 #endif |
108 #else | 108 #else |
109 extern DECLSPEC SDL_Thread *SDLCALL | 109 extern DECLSPEC SDL_Thread *SDLCALL |
110 SDL_CreateThread (int (SDLCALL * fn) (void *), void *data); | 110 SDL_CreateThread(int (SDLCALL * fn) (void *), void *data); |
111 #endif | 111 #endif |
112 | 112 |
113 /* Get the 32-bit thread identifier for the current thread */ | 113 /* Get the 32-bit thread identifier for the current thread */ |
114 extern DECLSPEC Uint32 SDLCALL SDL_ThreadID (void); | 114 extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void); |
115 | 115 |
116 /* Get the 32-bit thread identifier for the specified thread, | 116 /* Get the 32-bit thread identifier for the specified thread, |
117 equivalent to SDL_ThreadID() if the specified thread is NULL. | 117 equivalent to SDL_ThreadID() if the specified thread is NULL. |
118 */ | 118 */ |
119 extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID (SDL_Thread * thread); | 119 extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread * thread); |
120 | 120 |
121 /* Wait for a thread to finish. | 121 /* Wait for a thread to finish. |
122 The return code for the thread function is placed in the area | 122 The return code for the thread function is placed in the area |
123 pointed to by 'status', if 'status' is not NULL. | 123 pointed to by 'status', if 'status' is not NULL. |
124 */ | 124 */ |
125 extern DECLSPEC void SDLCALL SDL_WaitThread (SDL_Thread * thread, | 125 extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); |
126 int *status); | |
127 | 126 |
128 /* Forcefully kill a thread without worrying about its state */ | 127 /* Forcefully kill a thread without worrying about its state */ |
129 extern DECLSPEC void SDLCALL SDL_KillThread (SDL_Thread * thread); | 128 extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread * thread); |
130 | 129 |
131 | 130 |
132 /* Ends C function definitions when using C++ */ | 131 /* Ends C function definitions when using C++ */ |
133 #ifdef __cplusplus | 132 #ifdef __cplusplus |
134 /* *INDENT-OFF* */ | 133 /* *INDENT-OFF* */ |