Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | #ifndef Py_PYTHREAD_H |
2 | #define Py_PYTHREAD_H | |
3 | ||
4 | #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ | |
5 | /* (the result is no use of signals on SGI) */ | |
6 | ||
7 | typedef void *PyThread_type_lock; | |
8 | typedef void *PyThread_type_sema; | |
9 | ||
10 | #ifdef __cplusplus | |
11 | extern "C" { | |
12 | #endif | |
13 | ||
14 | PyAPI_FUNC(void) PyThread_init_thread(void); | |
15 | PyAPI_FUNC(long) PyThread_start_new_thread(void (*)(void *), void *); | |
16 | PyAPI_FUNC(void) PyThread_exit_thread(void); | |
17 | PyAPI_FUNC(void) PyThread__PyThread_exit_thread(void); | |
18 | PyAPI_FUNC(long) PyThread_get_thread_ident(void); | |
19 | ||
20 | PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void); | |
21 | PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock); | |
22 | PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); | |
23 | #define WAIT_LOCK 1 | |
24 | #define NOWAIT_LOCK 0 | |
25 | PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock); | |
26 | ||
27 | #ifndef NO_EXIT_PROG | |
28 | PyAPI_FUNC(void) PyThread_exit_prog(int); | |
29 | PyAPI_FUNC(void) PyThread__PyThread_exit_prog(int); | |
30 | #endif | |
31 | ||
32 | /* Thread Local Storage (TLS) API */ | |
33 | PyAPI_FUNC(int) PyThread_create_key(void); | |
34 | PyAPI_FUNC(void) PyThread_delete_key(int); | |
35 | PyAPI_FUNC(int) PyThread_set_key_value(int, void *); | |
36 | PyAPI_FUNC(void *) PyThread_get_key_value(int); | |
37 | PyAPI_FUNC(void) PyThread_delete_key_value(int key); | |
38 | ||
39 | #ifdef __cplusplus | |
40 | } | |
41 | #endif | |
42 | ||
43 | #endif /* !Py_PYTHREAD_H */ |