Mercurial > cpython-lru_cache-weakref
annotate Include/pythread.h @ 58765:2ba7677bfa95 legacy-trunk
testCopysign was defined twice in test_math; combine the definitions
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sat, 06 Feb 2010 23:11:25 +0000 |
| parents | db99f8752710 |
| children | df5719c298db |
| rev | line source |
|---|---|
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 |
|
13445
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
2 #ifndef Py_PYTHREAD_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
3 #define Py_PYTHREAD_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
4 |
|
9679
877d23bd5bdc
Thanks to Chris Herborth, the thread primitives now have proper Py*
Guido van Rossum <guido@python.org>
parents:
9586
diff
changeset
|
5 #define NO_EXIT_PROG /* don't define PyThread_exit_prog() */ |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
6 /* (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
|
7 |
|
9679
877d23bd5bdc
Thanks to Chris Herborth, the thread primitives now have proper Py*
Guido van Rossum <guido@python.org>
parents:
9586
diff
changeset
|
8 typedef void *PyThread_type_lock; |
|
877d23bd5bdc
Thanks to Chris Herborth, the thread primitives now have proper Py*
Guido van Rossum <guido@python.org>
parents:
9586
diff
changeset
|
9 typedef void *PyThread_type_sema; |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
10 |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
11 #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
|
12 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
|
13 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
14 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
15 PyAPI_FUNC(void) PyThread_init_thread(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
16 PyAPI_FUNC(long) PyThread_start_new_thread(void (*)(void *), void *); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
17 PyAPI_FUNC(void) PyThread_exit_thread(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
18 PyAPI_FUNC(void) PyThread__PyThread_exit_thread(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
19 PyAPI_FUNC(long) PyThread_get_thread_ident(void); |
|
5194
52f3dc41f6c4
Add Macros defining new names for all external symbols.
Guido van Rossum <guido@python.org>
parents:
4374
diff
changeset
|
20 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
21 PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
22 PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
23 PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 #define WAIT_LOCK 1 |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 #define NOWAIT_LOCK 0 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
26 PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock); |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 |
|
38794
f7d23bca599f
Patch #1454481: Make thread stack size runtime tunable.
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
38592
diff
changeset
|
28 PyAPI_FUNC(size_t) PyThread_get_stacksize(void); |
|
f7d23bca599f
Patch #1454481: Make thread stack size runtime tunable.
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
38592
diff
changeset
|
29 PyAPI_FUNC(int) PyThread_set_stacksize(size_t); |
|
f7d23bca599f
Patch #1454481: Make thread stack size runtime tunable.
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
38592
diff
changeset
|
30 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
31 #ifndef NO_EXIT_PROG |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
32 PyAPI_FUNC(void) PyThread_exit_prog(int); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
33 PyAPI_FUNC(void) PyThread__PyThread_exit_prog(int); |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1442
diff
changeset
|
34 #endif |
|
923
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 |
|
28694
a4154dd5939a
New PyGILState_ API - implements pep 311, from patch 684256.
Mark Hammond <mhammond@skippinet.com.au>
parents:
24752
diff
changeset
|
36 /* Thread Local Storage (TLS) API */ |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
37 PyAPI_FUNC(int) PyThread_create_key(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
38 PyAPI_FUNC(void) PyThread_delete_key(int); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
39 PyAPI_FUNC(int) PyThread_set_key_value(int, void *); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
40 PyAPI_FUNC(void *) PyThread_get_key_value(int); |
|
28694
a4154dd5939a
New PyGILState_ API - implements pep 311, from patch 684256.
Mark Hammond <mhammond@skippinet.com.au>
parents:
24752
diff
changeset
|
41 PyAPI_FUNC(void) PyThread_delete_key_value(int key); |
|
5405
b7871ca930ad
Massive changes for separate thread state management.
Guido van Rossum <guido@python.org>
parents:
5194
diff
changeset
|
42 |
|
47664
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
43 /* Cleanup after a fork */ |
|
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
44 PyAPI_FUNC(void) PyThread_ReInitTLS(void); |
|
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
45 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
46 #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
|
47 } |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
48 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
49 |
|
10456
3f213a8fc04e
Conform to standard boilerplate.
Guido van Rossum <guido@python.org>
parents:
9679
diff
changeset
|
50 #endif /* !Py_PYTHREAD_H */ |
