Mercurial > cpython-lru_cache-weakref
annotate Include/pythread.h @ 65035:87f4b32905df 2.7
Cosmetic fix to use print function.
| author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> |
|---|---|
| date | Fri, 01 Oct 2010 10:48:47 +0000 |
| parents | df5719c298db |
| children |
| 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 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
|
6 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
|
7 |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
8 #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
|
9 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
|
10 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
11 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
12 PyAPI_FUNC(void) PyThread_init_thread(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
13 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
|
14 PyAPI_FUNC(void) PyThread_exit_thread(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
15 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
|
16 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
17 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
|
18 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
|
19 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
|
20 #define WAIT_LOCK 1 |
|
72aceed365d4
* Makefile adapted to changes below.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
21 #define NOWAIT_LOCK 0 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
22 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
|
23 |
|
38794
f7d23bca599f
Patch #1454481: Make thread stack size runtime tunable.
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
38592
diff
changeset
|
24 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
|
25 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
|
26 |
|
28694
a4154dd5939a
New PyGILState_ API - implements pep 311, from patch 684256.
Mark Hammond <mhammond@skippinet.com.au>
parents:
24752
diff
changeset
|
27 /* Thread Local Storage (TLS) API */ |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
28 PyAPI_FUNC(int) PyThread_create_key(void); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
29 PyAPI_FUNC(void) PyThread_delete_key(int); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
21766
diff
changeset
|
30 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
|
31 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
|
32 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
|
33 |
|
47664
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
34 /* Cleanup after a fork */ |
|
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
35 PyAPI_FUNC(void) PyThread_ReInitTLS(void); |
|
db99f8752710
#1683 prevent forking from interfering in threading storage
Benjamin Peterson <benjamin@python.org>
parents:
38794
diff
changeset
|
36 |
|
1047
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
37 #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
|
38 } |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
39 #endif |
|
6b5a34db21fe
Added C++ support in thread.h; don't use signals if not strictly
Sjoerd Mullender <sjoerd@acm.org>
parents:
961
diff
changeset
|
40 |
|
10456
3f213a8fc04e
Conform to standard boilerplate.
Guido van Rossum <guido@python.org>
parents:
9679
diff
changeset
|
41 #endif /* !Py_PYTHREAD_H */ |
