comparison src/thread/dc/SDL_systhread.c @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents 11134dc42da8
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
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: */