diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /contrib/tools/cython/Cython/Includes/cpython/pythread.pxd | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/cpython/pythread.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/cpython/pythread.pxd | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd b/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd index 392bef7d64..67f48747c4 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/pythread.pxd @@ -1,45 +1,45 @@ - - -cdef extern from "pythread.h": - - ctypedef void *PyThread_type_lock - ctypedef void *PyThread_type_sema - - void PyThread_init_thread() + + +cdef extern from "pythread.h": + + ctypedef void *PyThread_type_lock + ctypedef void *PyThread_type_sema + + void PyThread_init_thread() long PyThread_start_new_thread(void (*)(void *), void *) # FIXME: legacy #unsigned long PyThread_start_new_thread(void (*)(void *), void *) # returned 'long' before Py3.7 - void PyThread_exit_thread() + void PyThread_exit_thread() long PyThread_get_thread_ident() # FIXME: legacy #unsigned long PyThread_get_thread_ident() # returned 'long' before Py3.7 - - PyThread_type_lock PyThread_allocate_lock() - void PyThread_free_lock(PyThread_type_lock) - int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil - void PyThread_release_lock(PyThread_type_lock) nogil - - enum: - # 'mode' in PyThread_acquire_lock() - WAIT_LOCK # 1 - NOWAIT_LOCK # 0 - - ctypedef enum PyLockStatus: - # return values of PyThread_acquire_lock() in CPython 3.2+ - PY_LOCK_FAILURE = 0 - PY_LOCK_ACQUIRED = 1 - PY_LOCK_INTR - - size_t PyThread_get_stacksize() - int PyThread_set_stacksize(size_t) - + + PyThread_type_lock PyThread_allocate_lock() + void PyThread_free_lock(PyThread_type_lock) + int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil + void PyThread_release_lock(PyThread_type_lock) nogil + + enum: + # 'mode' in PyThread_acquire_lock() + WAIT_LOCK # 1 + NOWAIT_LOCK # 0 + + ctypedef enum PyLockStatus: + # return values of PyThread_acquire_lock() in CPython 3.2+ + PY_LOCK_FAILURE = 0 + PY_LOCK_ACQUIRED = 1 + PY_LOCK_INTR + + size_t PyThread_get_stacksize() + int PyThread_set_stacksize(size_t) + # Thread Local Storage (TLS) API deprecated in CPython 3.7+ - int PyThread_create_key() - void PyThread_delete_key(int) - int PyThread_set_key_value(int, void *) - void * PyThread_get_key_value(int) - void PyThread_delete_key_value(int key) - - # Cleanup after a fork - void PyThread_ReInitTLS() + int PyThread_create_key() + void PyThread_delete_key(int) + int PyThread_set_key_value(int, void *) + void * PyThread_get_key_value(int) + void PyThread_delete_key_value(int key) + + # Cleanup after a fork + void PyThread_ReInitTLS() # Thread Specific Storage (TSS) API in CPython 3.7+ (also backported) #ctypedef struct Py_tss_t: pass # Cython built-in type |