|
1 | 1 | #ifndef _THREAD_H_included |
2 | 2 | #define _THREAD_H_included |
3 | 3 |
|
4 | | -#define NO_EXIT_PROG /* don't define exit_prog() */ |
| 4 | +#define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ |
5 | 5 | /* (the result is no use of signals on SGI) */ |
6 | 6 |
|
7 | 7 | #ifndef Py_PROTO |
|
12 | 12 | #endif |
13 | 13 | #endif |
14 | 14 |
|
15 | | -typedef void *type_lock; |
16 | | -typedef void *type_sema; |
| 15 | +typedef void *PyThread_type_lock; |
| 16 | +typedef void *PyThread_type_sema; |
17 | 17 |
|
18 | 18 | #ifdef __cplusplus |
19 | 19 | extern "C" { |
20 | 20 | #endif |
21 | 21 |
|
22 | | -/* Macros defining new names for all these symbols */ |
23 | | -/* BeOS note: We have exit_thread(), and no legacy code to |
24 | | - * support, so we won't allow exit_thread and _exit_thread |
25 | | - * in here. Actually, I think these #defines should vanish; |
26 | | - * aren't they cheesy in the face of the Great Renaming? [cjh] |
27 | | - */ |
28 | | -#define init_thread PyThread_init_thread |
29 | | -#define start_new_thread PyThread_start_new_thread |
30 | | -#ifndef __BEOS__ |
31 | | -#define exit_thread PyThread_exit_thread |
32 | | -#define _exit_thread PyThread__exit_thread |
33 | | -#endif |
34 | | -#define get_thread_ident PyThread_get_thread_ident |
35 | | -#define allocate_lock PyThread_allocate_lock |
36 | | -#define free_lock PyThread_free_lock |
37 | | -#define acquire_lock PyThread_acquire_lock |
38 | | -#define release_lock PyThread_release_lock |
39 | | -#define allocate_sema PyThread_allocate_sema |
40 | | -#define free_sema PyThread_free_sema |
41 | | -#define down_sema PyThread_down_sema |
42 | | -#define up_sema PyThread_up_sema |
43 | | -#define exit_prog PyThread_exit_prog |
44 | | -#define _exit_prog PyThread__exit_prog |
45 | | -#define create_key PyThread_create_key |
46 | | -#define delete_key PyThread_delete_key |
47 | | -#define get_key_value PyThread_get_key_value |
48 | | -#define set_key_value PyThread_set_key_value |
49 | | - |
50 | | - |
51 | | -DL_IMPORT(void) init_thread Py_PROTO((void)); |
52 | | -DL_IMPORT(int) start_new_thread Py_PROTO((void (*)(void *), void *)); |
53 | | -#ifndef __BEOS__ |
54 | | -DL_IMPORT(void) exit_thread Py_PROTO((void)); |
55 | | -DL_IMPORT(void) _exit_thread Py_PROTO((void)); |
56 | | -#else |
| 22 | +DL_IMPORT(void) PyThread_init_thread Py_PROTO((void)); |
| 23 | +DL_IMPORT(int) PyThread_start_new_thread Py_PROTO((void (*)(void *), void *)); |
57 | 24 | DL_IMPORT(void) PyThread_exit_thread Py_PROTO((void)); |
58 | | -DL_IMPORT(void) PyThread__exit_thread Py_PROTO((void)); |
59 | | -#endif |
60 | | -DL_IMPORT(long) get_thread_ident Py_PROTO((void)); |
| 25 | +DL_IMPORT(void) PyThread__PyThread_exit_thread Py_PROTO((void)); |
| 26 | +DL_IMPORT(long) PyThread_get_thread_ident Py_PROTO((void)); |
61 | 27 |
|
62 | | -DL_IMPORT(type_lock) allocate_lock Py_PROTO((void)); |
63 | | -DL_IMPORT(void) free_lock Py_PROTO((type_lock)); |
64 | | -DL_IMPORT(int) acquire_lock Py_PROTO((type_lock, int)); |
| 28 | +DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock Py_PROTO((void)); |
| 29 | +DL_IMPORT(void) PyThread_free_lock Py_PROTO((PyThread_type_lock)); |
| 30 | +DL_IMPORT(int) PyThread_acquire_lock Py_PROTO((PyThread_type_lock, int)); |
65 | 31 | #define WAIT_LOCK 1 |
66 | 32 | #define NOWAIT_LOCK 0 |
67 | | -DL_IMPORT(void) release_lock Py_PROTO((type_lock)); |
| 33 | +DL_IMPORT(void) PyThread_release_lock Py_PROTO((PyThread_type_lock)); |
68 | 34 |
|
69 | | -DL_IMPORT(type_sema) allocate_sema Py_PROTO((int)); |
70 | | -DL_IMPORT(void) free_sema Py_PROTO((type_sema)); |
71 | | -DL_IMPORT(int) down_sema Py_PROTO((type_sema, int)); |
| 35 | +DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema Py_PROTO((int)); |
| 36 | +DL_IMPORT(void) PyThread_free_sema Py_PROTO((PyThread_type_sema)); |
| 37 | +DL_IMPORT(int) PyThread_down_sema Py_PROTO((PyThread_type_sema, int)); |
72 | 38 | #define WAIT_SEMA 1 |
73 | 39 | #define NOWAIT_SEMA 0 |
74 | | -DL_IMPORT(void) up_sema Py_PROTO((type_sema)); |
| 40 | +DL_IMPORT(void) PyThread_up_sema Py_PROTO((PyThread_type_sema)); |
75 | 41 |
|
76 | 42 | #ifndef NO_EXIT_PROG |
77 | | -DL_IMPORT(void) exit_prog Py_PROTO((int)); |
78 | | -DL_IMPORT(void) _exit_prog Py_PROTO((int)); |
| 43 | +DL_IMPORT(void) PyThread_exit_prog Py_PROTO((int)); |
| 44 | +DL_IMPORT(void) PyThread__PyThread_exit_prog Py_PROTO((int)); |
79 | 45 | #endif |
80 | 46 |
|
81 | | -DL_IMPORT(int) create_key Py_PROTO((void)); |
82 | | -DL_IMPORT(void) delete_key Py_PROTO((int)); |
83 | | -DL_IMPORT(int) set_key_value Py_PROTO((int, void *)); |
84 | | -DL_IMPORT(void *) get_key_value Py_PROTO((int)); |
| 47 | +DL_IMPORT(int) PyThread_create_key Py_PROTO((void)); |
| 48 | +DL_IMPORT(void) PyThread_delete_key Py_PROTO((int)); |
| 49 | +DL_IMPORT(int) PyThread_set_key_value Py_PROTO((int, void *)); |
| 50 | +DL_IMPORT(void *) PyThread_get_key_value Py_PROTO((int)); |
85 | 51 |
|
86 | 52 | #ifdef __cplusplus |
87 | 53 | } |
|
0 commit comments