1 #ifndef _THREAD_H_included
2 #define _THREAD_H_included
4 #define NO_EXIT_PROG /* don't define exit_prog() */
5 /* (the result is no use of signals on SGI) */
8 #if defined(__STDC__) || defined(__cplusplus)
9 #define Py_PROTO(args) args
11 #define Py_PROTO(args) ()
15 typedef void *type_lock
;
16 typedef void *type_sema
;
22 void init_thread
Py_PROTO((void));
23 int start_new_thread
Py_PROTO((void (*)(void *), void *));
24 void exit_thread
Py_PROTO((void));
25 void _exit_thread
Py_PROTO((void));
26 long get_thread_ident
Py_PROTO((void));
28 type_lock allocate_lock
Py_PROTO((void));
29 void free_lock
Py_PROTO((type_lock
));
30 int acquire_lock
Py_PROTO((type_lock
, int));
33 void release_lock
Py_PROTO((type_lock
));
35 type_sema allocate_sema
Py_PROTO((int));
36 void free_sema
Py_PROTO((type_sema
));
37 void down_sema
Py_PROTO((type_sema
));
38 void up_sema
Py_PROTO((type_sema
));
41 void exit_prog
Py_PROTO((int));
42 void _exit_prog
Py_PROTO((int));