Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f
[chromium-blink-merge.git] / third_party / cython / src / Cython / Includes / cpython / pythread.pxd
blobe6c6395e13eaa4ec58dad811e927a11f5fbde721
3 cdef extern from "pythread.h":
5     ctypedef void *PyThread_type_lock
6     ctypedef void *PyThread_type_sema
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()
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
18     enum:
19         # 'mode' in PyThread_acquire_lock()
20         WAIT_LOCK    #   1
21         NOWAIT_LOCK  #   0
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
29     size_t PyThread_get_stacksize()
30     int PyThread_set_stacksize(size_t)
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)
39     # Cleanup after a fork
40     void PyThread_ReInitTLS()