Mercurial > cpython-lru_cache-weakref
annotate Include/thread.h @ 3044:7e7bb00a0a2e legacy-trunk
Added functionality: locate CW projects, copy them, empty them and
binhex them.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 31 Aug 1995 13:47:14 +0000 |
| parents | 05360cd616ae |
| children | 46140f5856d9 |
| rev | line source |
|---|---|
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 #ifndef _THREAD_H_included |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 #define _THREAD_H_included |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
4 #define NO_EXIT_PROG /* don't define exit_prog() */ |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
5 /* (the result is no use of signals on SGI) */ |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
6 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
7 #ifndef Py_PROTO |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
8 #if defined(__STDC__) || defined(__cplusplus) |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
9 #define Py_PROTO(args) args |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 #else |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
11 #define Py_PROTO(args) () |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
12 #endif |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 #endif |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
14 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
15 typedef void *type_lock; |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
16 typedef void *type_sema; |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
17 |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
18 #ifdef __cplusplus |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
19 extern "C" { |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
20 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
21 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
22 void init_thread Py_PROTO((void)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
23 int start_new_thread Py_PROTO((void (*)(void *), void *)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
24 void exit_thread Py_PROTO((void)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
25 void _exit_thread Py_PROTO((void)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
26 long get_thread_ident Py_PROTO((void)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
28 type_lock allocate_lock Py_PROTO((void)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
29 void free_lock Py_PROTO((type_lock)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
30 int acquire_lock Py_PROTO((type_lock, int)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 #define WAIT_LOCK 1 |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 #define NOWAIT_LOCK 0 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
33 void release_lock Py_PROTO((type_lock)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
35 type_sema allocate_sema Py_PROTO((int)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
36 void free_sema Py_PROTO((type_sema)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
37 void down_sema Py_PROTO((type_sema)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
38 void up_sema Py_PROTO((type_sema)); |
|
961
a31e07847063
New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()
Guido van Rossum <guido@python.org>
parents:
923
diff
changeset
|
39 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
40 #ifndef NO_EXIT_PROG |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
41 void exit_prog Py_PROTO((int)); |
|
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
42 void _exit_prog Py_PROTO((int)); |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
43 #endif |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
44 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
45 #ifdef __cplusplus |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
46 } |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
47 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
48 |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 #endif |
