Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 1 | #ifndef _THREAD_H_included |
| 2 | #define _THREAD_H_included |
| 3 | |
| 4 | #ifdef __STDC__ |
| 5 | #define _P(args) args |
| 6 | #else |
| 7 | #define _P(args) () |
| 8 | #endif |
| 9 | |
| 10 | void init_thread _P((void)); |
| 11 | int start_new_thread _P((void (*)(void *), void *)); |
| 12 | void exit_thread _P((void)); |
Guido van Rossum | f9f2e82 | 1992-08-17 08:59:08 +0000 | [diff] [blame^] | 13 | void _exit_thread _P((void)); |
Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 14 | |
| 15 | typedef void *type_lock; |
| 16 | |
| 17 | type_lock allocate_lock _P((void)); |
| 18 | void free_lock _P((type_lock)); |
| 19 | int acquire_lock _P((type_lock, int)); |
| 20 | #define WAIT_LOCK 1 |
| 21 | #define NOWAIT_LOCK 0 |
| 22 | void release_lock _P((type_lock)); |
| 23 | |
Guido van Rossum | f9f2e82 | 1992-08-17 08:59:08 +0000 | [diff] [blame^] | 24 | typedef void *type_sema; |
| 25 | |
| 26 | type_sema allocate_sema _P((int)); |
| 27 | void free_sema _P((type_sema)); |
| 28 | void down_sema _P((type_sema)); |
| 29 | void up_sema _P((type_sema)); |
| 30 | |
Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 31 | void exit_prog _P((int)); |
Guido van Rossum | f9f2e82 | 1992-08-17 08:59:08 +0000 | [diff] [blame^] | 32 | void _exit_prog _P((int)); |
Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 33 | |
| 34 | #undef _P |
| 35 | |
| 36 | #endif |