Rizin
unix-like reverse engineering framework and cli tools
|
#include "thread.h"
Go to the source code of this file.
Functions | |
RZ_API RZ_OWN RzThreadLock * | rz_th_lock_new (bool recursive) |
Allocates and initialize a RzThreadLock structure. More... | |
RZ_API void | rz_th_lock_enter (RZ_NONNULL RzThreadLock *thl) |
Acquires a RzThreadLock structure. More... | |
RZ_API bool | rz_th_lock_tryenter (RZ_NONNULL RzThreadLock *thl) |
Tries to acquire a RzThreadLock structure. More... | |
RZ_API void | rz_th_lock_leave (RZ_NONNULL RzThreadLock *thl) |
Releases a RzThreadLock structure. More... | |
RZ_API void | rz_th_lock_free (RZ_NULLABLE RzThreadLock *thl) |
Frees a RzThreadLock structure. More... | |
RZ_API void rz_th_lock_enter | ( | RZ_NONNULL RzThreadLock * | thl | ) |
Acquires a RzThreadLock structure.
thl | The RzThreadLock to acquire |
Definition at line 45 of file thread_lock.c.
References rz_return_if_fail.
Referenced by _sendResponsePacket(), backtrace_windows(), basefind_thread_runner(), gdbr_lock_enter(), iob_net_write(), iob_read(), iob_write(), rz_atomic_bool_get(), rz_atomic_bool_set(), rz_core_task_schedule(), rz_path_prefix(), rz_path_set_prefix(), rz_test_main(), rz_th_queue_is_empty(), rz_th_queue_is_full(), rz_th_queue_pop(), rz_th_queue_push(), rz_th_queue_wait_pop(), shared_data_read_at(), shared_ht_up_insert(), subprocess_lock(), task_wakeup(), tasks_lock_enter(), and worker_th().
RZ_API void rz_th_lock_free | ( | RZ_NULLABLE RzThreadLock * | thl | ) |
Frees a RzThreadLock structure.
thl | The RzThreadLock to free |
Definition at line 89 of file thread_lock.c.
References free().
Referenced by gdbr_cleanup(), rz_atomic_bool_free(), rz_basefind(), rz_bin_file_strings(), rz_core_task_scheduler_fini(), rz_subprocess_fini(), rz_subprocess_init(), rz_test_main(), rz_th_queue_free(), task_free(), and winkd_kdctx_free().
RZ_API void rz_th_lock_leave | ( | RZ_NONNULL RzThreadLock * | thl | ) |
Releases a RzThreadLock structure.
thl | The RzThreadLock to release |
Definition at line 75 of file thread_lock.c.
References rz_return_if_fail.
Referenced by _sendResponsePacket(), backtrace_windows(), basefind_thread_runner(), gdbr_lock_leave(), iob_net_write(), iob_read(), iob_write(), rz_atomic_bool_get(), rz_atomic_bool_set(), rz_core_task_schedule(), rz_path_prefix(), rz_path_set_prefix(), rz_test_main(), rz_th_queue_is_empty(), rz_th_queue_is_full(), rz_th_queue_pop(), rz_th_queue_push(), rz_th_queue_wait_pop(), shared_data_read_at(), shared_ht_up_insert(), subprocess_unlock(), task_wakeup(), tasks_lock_leave(), winkd_lock_leave(), and worker_th().
RZ_API RZ_OWN RzThreadLock* rz_th_lock_new | ( | bool | recursive | ) |
Allocates and initialize a RzThreadLock structure.
recursive | Set it to true for recursive locking (on windows, all the locks are always recursive). |
Definition at line 14 of file thread_lock.c.
References rz_th_lock_t::lock, NULL, and RZ_NEW0.
Referenced by backtrace_windows(), gdbr_init(), iob_net_open(), iob_read(), iob_write(), rz_atomic_bool_new(), rz_basefind(), rz_bin_file_strings(), rz_core_task_new(), rz_core_task_scheduler_init(), rz_subprocess_init(), rz_test_main(), rz_th_queue_new(), and winkd_kdctx_new().
RZ_API bool rz_th_lock_tryenter | ( | RZ_NONNULL RzThreadLock * | thl | ) |
Tries to acquire a RzThreadLock structure.
thl | The RzThreadLock to try to acquire |
Definition at line 61 of file thread_lock.c.
References rz_return_val_if_fail.
Referenced by gdbr_lock_tryenter(), and winkd_lock_enter().