Mercurial > sdl-ios-xcode
annotate src/thread/nds/SDL_systhread.c @ 2686:e9f27fe4f2a1 gsoc2008_nds
Existing testsprite programs made into NDS projects
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Wed, 13 Aug 2008 00:49:03 +0000 |
parents | c3e7c0698cbb |
children |
rev | line source |
---|---|
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
1 /* |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
4 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Library General Public |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
8 version 2 of the License, or (at your option) any later version. |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
9 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
13 Library General Public License for more details. |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
14 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Library General Public |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
18 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
19 Sam Lantinga |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
20 slouken@devolution.com |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
21 */ |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
22 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
23 #ifdef SAVE_RCSID |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
24 static char rcsid = |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
25 "@(#) $Id: SDL_systhread.c,v 1.2 2001/04/26 16:50:18 hercules Exp $"; |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
26 #endif |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
27 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
28 /* Thread management routines for SDL */ |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
29 |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
30 #include "SDL_error.h" |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
31 #include "SDL_thread.h" |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
32 #include "SDL_systhread.h" |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
33 |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
34 int |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
35 SDL_SYS_CreateThread(SDL_Thread * thread, void *args) |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
36 { |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
37 SDL_SetError("Threads are not supported on this platform"); |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
38 return (-1); |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
39 } |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
40 |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
41 void |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
42 SDL_SYS_SetupThread(void) |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
43 { |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
44 return; |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
45 } |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
46 |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
47 Uint32 |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
48 SDL_ThreadID(void) |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
49 { |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
50 return (0); |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
51 } |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
52 |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
53 void |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
54 SDL_SYS_WaitThread(SDL_Thread * thread) |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
55 { |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
56 return; |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
57 } |
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
58 |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
59 void |
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
60 SDL_SYS_KillThread(SDL_Thread * thread) |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
61 { |
2671
c3e7c0698cbb
some changes to the dummy driver for debug purposes that should be reverted.
Darren Alton <dalton@stevens.edu>
parents:
2670
diff
changeset
|
62 return; |
2670
6e4669f4db49
Fix for the previous commit: actually 'svn add'ed some files.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
63 } |