blob: fb2ff48f9616775d9475b88c0df0c43e12e136c0 [file] [log] [blame]
Guido van Rossum1984f1e1992-08-04 12:41:02 +00001#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
10void init_thread _P((void));
11int start_new_thread _P((void (*)(void *), void *));
12void exit_thread _P((void));
Guido van Rossumf9f2e821992-08-17 08:59:08 +000013void _exit_thread _P((void));
Guido van Rossum1984f1e1992-08-04 12:41:02 +000014
15typedef void *type_lock;
16
17type_lock allocate_lock _P((void));
18void free_lock _P((type_lock));
19int acquire_lock _P((type_lock, int));
20#define WAIT_LOCK 1
21#define NOWAIT_LOCK 0
22void release_lock _P((type_lock));
23
Guido van Rossumf9f2e821992-08-17 08:59:08 +000024typedef void *type_sema;
25
26type_sema allocate_sema _P((int));
27void free_sema _P((type_sema));
28void down_sema _P((type_sema));
29void up_sema _P((type_sema));
30
Guido van Rossum1984f1e1992-08-04 12:41:02 +000031void exit_prog _P((int));
Guido van Rossumf9f2e821992-08-17 08:59:08 +000032void _exit_prog _P((int));
Guido van Rossum1984f1e1992-08-04 12:41:02 +000033
34#undef _P
35
36#endif