Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / cython / src / Cython / Includes / cpython / pythread.pxd
1
2
3 cdef extern from "pythread.h":
4
5     ctypedef void *PyThread_type_lock
6     ctypedef void *PyThread_type_sema
7
8     void PyThread_init_thread()
9     long PyThread_start_new_thread(void (*)(void *), void *)
10     void PyThread_exit_thread()
11     long PyThread_get_thread_ident()
12
13     PyThread_type_lock PyThread_allocate_lock()
14     void PyThread_free_lock(PyThread_type_lock)
15     int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil
16     void PyThread_release_lock(PyThread_type_lock) nogil
17
18     enum:
19         # 'mode' in PyThread_acquire_lock()
20         WAIT_LOCK    #   1
21         NOWAIT_LOCK  #   0
22
23     ctypedef enum PyLockStatus:
24         # return values of PyThread_acquire_lock() in CPython 3.2+
25         PY_LOCK_FAILURE = 0
26         PY_LOCK_ACQUIRED = 1
27         PY_LOCK_INTR
28
29     size_t PyThread_get_stacksize()
30     int PyThread_set_stacksize(size_t)
31
32     # Thread Local Storage (TLS) API
33     int PyThread_create_key()
34     void PyThread_delete_key(int)
35     int PyThread_set_key_value(int, void *)
36     void * PyThread_get_key_value(int)
37     void PyThread_delete_key_value(int key)
38
39     # Cleanup after a fork
40     void PyThread_ReInitTLS()