|
1 /* Copyright (c) 2009 The Khronos Group Inc. |
|
2 * |
|
3 * Permission is hereby granted, free of charge, to any person obtaining a |
|
4 * copy of this software and/or associated documentation files (the |
|
5 * "Materials"), to deal in the Materials without restriction, including |
|
6 * without limitation the rights to use, copy, modify, merge, publish, |
|
7 * distribute, sublicense, and/or sell copies of the Materials, and to |
|
8 * permit persons to whom the Materials are furnished to do so, subject to |
|
9 * the following conditions: |
|
10 * |
|
11 * The above copyright notice and this permission notice shall be included |
|
12 * in all copies or substantial portions of the Materials. |
|
13 * |
|
14 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
20 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
|
21 */ |
|
22 |
|
23 #ifndef OWFTHREAD_H |
|
24 #define OWFTHREAD_H |
|
25 |
|
26 #include "owftypes.h" |
|
27 |
|
28 #ifdef __cplusplus |
|
29 extern "C" { |
|
30 #endif |
|
31 |
|
32 |
|
33 typedef void* OWF_THREAD; |
|
34 |
|
35 OWF_API_CALL void |
|
36 OWF_Thread_Destroy(OWF_THREAD thread); |
|
37 |
|
38 OWF_API_CALL OWF_THREAD |
|
39 OWF_Thread_Create(void* (*threadfunc)(void*), void* data); |
|
40 |
|
41 OWF_API_CALL OWFint |
|
42 OWF_Thread_Join(OWF_THREAD thread, void** retval); |
|
43 |
|
44 OWF_API_CALL OWFint |
|
45 OWF_Thread_Cancel(OWF_THREAD thread); |
|
46 |
|
47 OWF_API_CALL void |
|
48 OWF_Thread_Exit(void* retval); |
|
49 |
|
50 OWF_API_CALL void |
|
51 OWF_Thread_MicroSleep(OWFuint32 usecs); |
|
52 |
|
53 OWF_API_CALL void |
|
54 OWF_Thread_Sleep(OWFuint32 secs); |
|
55 |
|
56 |
|
57 #ifdef __cplusplus |
|
58 } |
|
59 #endif |
|
60 |
|
61 |
|
62 #endif |