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