Mercurial > cpython-lru_cache-weakref
annotate Include/thread.h @ 1590:ac2e5cc29949 legacy-trunk
Added tests for missing host to open_http and open_gopher
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 18 Apr 1994 09:39:56 +0000 |
| parents | 4749c957466b |
| children | 1940892d2fe3 |
| 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 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
4 #ifndef 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
|
5 #if defined(__STDC__) || defined(__cplusplus) |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
6 #define PROTO(args) args |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 #else |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
8 #define PROTO(args) () |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
9 #endif |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 #endif |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
12 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
|
13 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
|
14 |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
15 #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
|
16 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
|
17 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
18 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
19 void init_thread PROTO((void)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
20 int start_new_thread PROTO((void (*)(void *), void *)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
21 void exit_thread PROTO((void)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
22 void _exit_thread PROTO((void)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
24 type_lock allocate_lock PROTO((void)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
25 void free_lock PROTO((type_lock)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
26 int acquire_lock PROTO((type_lock, int)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 #define WAIT_LOCK 1 |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 #define NOWAIT_LOCK 0 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
29 void release_lock PROTO((type_lock)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
31 type_sema allocate_sema PROTO((int)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
32 void free_sema PROTO((type_sema)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
33 void down_sema PROTO((type_sema)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
34 void up_sema 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
|
35 |
|
1442
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
36 void exit_prog PROTO((int)); |
|
4749c957466b
almodule.c: added close method, equivalent to closeport.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1047
diff
changeset
|
37 void _exit_prog PROTO((int)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
39 #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
|
40 } |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
41 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
42 |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
43 #endif |
