|
Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
| struct | rz_atomic_bool_t |
Functions | |
| RZ_API RZ_OWN RzAtomicBool * | rz_atomic_bool_new (bool value) |
| Initialize a thread safe bool type container. More... | |
| RZ_API void | rz_atomic_bool_free (RZ_NULLABLE RzAtomicBool *tbool) |
| Frees a RzAtomicBool structure. More... | |
| RZ_API bool | rz_atomic_bool_get (RZ_NONNULL RzAtomicBool *tbool) |
| Gets the current value hold by the RzAtomicBool structure. More... | |
| RZ_API void | rz_atomic_bool_set (RZ_NONNULL RzAtomicBool *tbool, bool value) |
| Sets the value int the RzAtomicBool structure. More... | |
The native types should actually be real atomic types but these should be falling back in similar structs in case of insupported atomic types.
Definition in file thread_types.c.
| RZ_API void rz_atomic_bool_free | ( | RZ_NULLABLE RzAtomicBool * | tbool | ) |
Frees a RzAtomicBool structure.
| tbool | The RzAtomicBool structure to free |
Definition at line 39 of file thread_types.c.
References free(), and rz_th_lock_free().
Referenced by bin_file_string_search_free(), and rz_basefind().
| RZ_API bool rz_atomic_bool_get | ( | RZ_NONNULL RzAtomicBool * | tbool | ) |
Gets the current value hold by the RzAtomicBool structure.
| [in] | tbool | The RzAtomicBool to safely access |
Definition at line 54 of file thread_types.c.
References rz_return_val_if_fail, rz_th_lock_enter(), rz_th_lock_leave(), and value.
Referenced by basefind_thread_runner(), basefind_thread_ui(), rz_core_rtr_rap_thread(), and search_string_thread_runner().
| RZ_API RZ_OWN RzAtomicBool* rz_atomic_bool_new | ( | bool | value | ) |
Initialize a thread safe bool type container.
| [in] | value | The initial value status |
Definition at line 24 of file thread_types.c.
References rz_atomic_bool_t::lock, NULL, RZ_NEW0, rz_th_lock_new(), and rz_atomic_bool_t::value.
Referenced by create_string_search_thread(), rz_basefind(), and rz_core_rtr_cmd().
| RZ_API void rz_atomic_bool_set | ( | RZ_NONNULL RzAtomicBool * | tbool, |
| bool | value | ||
| ) |
Sets the value int the RzAtomicBool structure.
| tbool | The RzAtomicBool to safely modify | |
| [in] | value | The new value to set |
Definition at line 68 of file thread_types.c.
References rz_return_if_fail, rz_th_lock_enter(), rz_th_lock_leave(), and value.
Referenced by basefind_stop_all_search_threads(), interrupt_thread(), rz_basefind(), and rz_core_wait().