Mercurial > sdl-ios-xcode
comparison src/thread/dc/SDL_systhread.c @ 1461:11134dc42da8
Updated for Dreamcast KOS June 2005 snapshot:
http://cadcdev.sourceforge.net/svn/snapshots/
http://gamedev.allusion.net/softprj/kos/dcsetup.php
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 02 Mar 2006 13:16:02 +0000 |
parents | d910939febfa |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
1460:d79e6b0c2c19 | 1461:11134dc42da8 |
---|---|
22 #include "SDL_config.h" | 22 #include "SDL_config.h" |
23 | 23 |
24 /* Thread management routines for SDL */ | 24 /* Thread management routines for SDL */ |
25 | 25 |
26 #include "SDL_thread.h" | 26 #include "SDL_thread.h" |
27 #include "../SDL_thread_c.h" | |
27 #include "../SDL_systhread.h" | 28 #include "../SDL_systhread.h" |
28 | 29 |
29 #include <kos/thread.h> | 30 #include <kos/thread.h> |
30 | 31 |
31 #if SDL_THREADS_DISABLED | |
32 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) | |
33 { | |
34 SDL_SetError("Threads are not supported on this platform"); | |
35 return(-1); | |
36 } | |
37 | |
38 void SDL_SYS_SetupThread(void) | |
39 { | |
40 return; | |
41 } | |
42 | |
43 Uint32 SDL_ThreadID(void) | |
44 { | |
45 return(0); | |
46 } | |
47 | |
48 void SDL_SYS_WaitThread(SDL_Thread *thread) | |
49 { | |
50 return; | |
51 } | |
52 | |
53 void SDL_SYS_KillThread(SDL_Thread *thread) | |
54 { | |
55 return; | |
56 } | |
57 | |
58 #else | |
59 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) | 32 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) |
60 { | 33 { |
61 thread->handle = thd_create(SDL_RunThread,args); | 34 thread->handle = thd_create(SDL_RunThread,args); |
62 if (thread->handle == NULL) { | 35 if (thread->handle == NULL) { |
63 SDL_SetError("Not enough resources to create thread"); | 36 SDL_SetError("Not enough resources to create thread"); |
83 | 56 |
84 void SDL_SYS_KillThread(SDL_Thread *thread) | 57 void SDL_SYS_KillThread(SDL_Thread *thread) |
85 { | 58 { |
86 thd_destroy(thread->handle); | 59 thd_destroy(thread->handle); |
87 } | 60 } |
88 #endif |