blob: 680b7fb8c15712fb5dc0d6d1d71d89d724d93584 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef _THREAD_H_included
#define _THREAD_H_included
#define NO_EXIT_PROG /* don't define exit_prog() */
/* (the result is no use of signals on SGI) */
#ifndef PROTO
#if defined(__STDC__) || defined(__cplusplus)
#define PROTO(args) args
#else
#define PROTO(args) ()
#endif
#endif
typedef void *type_lock;
typedef void *type_sema;
#ifdef __cplusplus
extern "C" {
#endif
void init_thread PROTO((void));
int start_new_thread PROTO((void (*)(void *), void *));
void exit_thread PROTO((void));
void _exit_thread PROTO((void));
long get_thread_ident PROTO((void));
type_lock allocate_lock PROTO((void));
void free_lock PROTO((type_lock));
int acquire_lock PROTO((type_lock, int));
#define WAIT_LOCK 1
#define NOWAIT_LOCK 0
void release_lock PROTO((type_lock));
type_sema allocate_sema PROTO((int));
void free_sema PROTO((type_sema));
void down_sema PROTO((type_sema));
void up_sema PROTO((type_sema));
#ifndef NO_EXIT_PROG
void exit_prog PROTO((int));
void _exit_prog PROTO((int));
#endif
#ifdef __cplusplus
}
#endif
#endif
|