Mercurial > cpython-lru_cache-weakref
annotate Include/thread.h @ 6719:faebc1940432 legacy-trunk
Understand -Xlinker option.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 02 Dec 1997 20:38:11 +0000 |
| parents | b7871ca930ad |
| children | bd47ee068b83 |
| 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 |
|
5194
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
22 /* Macros defining new names for all these symbols */ |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
23 #define init_thread PyThread_init_thread |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
24 #define start_new_thread PyThread_start_new_thread |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
25 #define exit_thread PyThread_exit_thread |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
26 #define _exit_thread PyThread__exit_thread |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
27 #define get_thread_ident PyThread_get_thread_ident |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
28 #define allocate_lock PyThread_allocate_lock |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
29 #define free_lock PyThread_free_lock |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
30 #define acquire_lock PyThread_acquire_lock |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
31 #define release_lock PyThread_release_lock |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
32 #define allocate_sema PyThread_allocate_sema |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
33 #define free_sema PyThread_free_sema |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
34 #define down_sema PyThread_down_sema |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
35 #define up_sema PyThread_up_sema |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
36 #define exit_prog PyThread_exit_prog |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
37 #define _exit_prog PyThread__exit_prog |
|
5405
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
38 #define create_key PyThread_create_key |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
39 #define delete_key PyThread_delete_key |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
40 #define get_key_value PyThread_get_key_value |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
41 #define set_key_value PyThread_set_key_value |
|
5194
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
42 |
|
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
43 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
44 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
|
45 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
|
46 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
|
47 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
|
48 long get_thread_ident Py_PROTO((void)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
50 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
|
51 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
|
52 int acquire_lock Py_PROTO((type_lock, int)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
53 #define WAIT_LOCK 1 |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
54 #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
|
55 void release_lock Py_PROTO((type_lock)); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
56 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
57 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
|
58 void free_sema Py_PROTO((type_sema)); |
|
4374
46140f5856d9
Add waitflag to down_sema().
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
59 int down_sema Py_PROTO((type_sema, int)); |
|
46140f5856d9
Add waitflag to down_sema().
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
60 #define WAIT_SEMA 1 |
|
46140f5856d9
Add waitflag to down_sema().
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
61 #define NOWAIT_SEMA 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
|
62 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
|
63 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
64 #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
|
65 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
|
66 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
|
67 #endif |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
68 |
|
5405
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
69 int create_key Py_PROTO((void)); |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
70 void delete_key Py_PROTO((int)); |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
71 int set_key_value Py_PROTO((int, void *)); |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
72 void * get_key_value Py_PROTO((int)); |
|
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
73 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
74 #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
|
75 } |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
76 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
77 |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 #endif |
