Mercurial > sdl-ios-xcode
comparison src/thread/dc/SDL_systhread.c @ 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 |
---|---|
28 #include "../SDL_systhread.h" | 28 #include "../SDL_systhread.h" |
29 | 29 |
30 #include <kos/thread.h> | 30 #include <kos/thread.h> |
31 | 31 |
32 int | 32 int |
33 SDL_SYS_CreateThread (SDL_Thread * thread, void *args) | 33 SDL_SYS_CreateThread(SDL_Thread * thread, void *args) |
34 { | 34 { |
35 thread->handle = thd_create (SDL_RunThread, args); | 35 thread->handle = thd_create(SDL_RunThread, args); |
36 if (thread->handle == NULL) { | 36 if (thread->handle == NULL) { |
37 SDL_SetError ("Not enough resources to create thread"); | 37 SDL_SetError("Not enough resources to create thread"); |
38 return (-1); | 38 return (-1); |
39 } | 39 } |
40 return (0); | 40 return (0); |
41 } | 41 } |
42 | 42 |
43 void | 43 void |
44 SDL_SYS_SetupThread (void) | 44 SDL_SYS_SetupThread(void) |
45 { | 45 { |
46 return; | 46 return; |
47 } | 47 } |
48 | 48 |
49 Uint32 | 49 Uint32 |
50 SDL_ThreadID (void) | 50 SDL_ThreadID(void) |
51 { | 51 { |
52 return (Uint32) thd_get_current (); | 52 return (Uint32) thd_get_current(); |
53 } | 53 } |
54 | 54 |
55 void | 55 void |
56 SDL_SYS_WaitThread (SDL_Thread * thread) | 56 SDL_SYS_WaitThread(SDL_Thread * thread) |
57 { | 57 { |
58 thd_wait (thread->handle); | 58 thd_wait(thread->handle); |
59 } | 59 } |
60 | 60 |
61 void | 61 void |
62 SDL_SYS_KillThread (SDL_Thread * thread) | 62 SDL_SYS_KillThread(SDL_Thread * thread) |
63 { | 63 { |
64 thd_destroy (thread->handle); | 64 thd_destroy(thread->handle); |
65 } | 65 } |
66 | 66 |
67 /* vi: set ts=4 sw=4 expandtab: */ | 67 /* vi: set ts=4 sw=4 expandtab: */ |