source: vendor/python/2.5/Include/pythread.h

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 1.3 KB
Line 
1
2#ifndef Py_PYTHREAD_H
3#define Py_PYTHREAD_H
4
5#define NO_EXIT_PROG /* don't define PyThread_exit_prog() */
6 /* (the result is no use of signals on SGI) */
7
8typedef void *PyThread_type_lock;
9typedef void *PyThread_type_sema;
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15PyAPI_FUNC(void) PyThread_init_thread(void);
16PyAPI_FUNC(long) PyThread_start_new_thread(void (*)(void *), void *);
17PyAPI_FUNC(void) PyThread_exit_thread(void);
18PyAPI_FUNC(void) PyThread__PyThread_exit_thread(void);
19PyAPI_FUNC(long) PyThread_get_thread_ident(void);
20
21PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void);
22PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock);
23PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int);
24#define WAIT_LOCK 1
25#define NOWAIT_LOCK 0
26PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock);
27
28PyAPI_FUNC(size_t) PyThread_get_stacksize(void);
29PyAPI_FUNC(int) PyThread_set_stacksize(size_t);
30
31#ifndef NO_EXIT_PROG
32PyAPI_FUNC(void) PyThread_exit_prog(int);
33PyAPI_FUNC(void) PyThread__PyThread_exit_prog(int);
34#endif
35
36/* Thread Local Storage (TLS) API */
37PyAPI_FUNC(int) PyThread_create_key(void);
38PyAPI_FUNC(void) PyThread_delete_key(int);
39PyAPI_FUNC(int) PyThread_set_key_value(int, void *);
40PyAPI_FUNC(void *) PyThread_get_key_value(int);
41PyAPI_FUNC(void) PyThread_delete_key_value(int key);
42
43#ifdef __cplusplus
44}
45#endif
46
47#endif /* !Py_PYTHREAD_H */
Note: See TracBrowser for help on using the repository browser.