logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

qb_thread_lock_create - Create a new lock of the given type.

Description

Name

       qb_thread_lock_create - Create a new lock of the given type.

Params

typeQB_THREAD_LOCK_SHORT==spinlock(whereavailable,elsemutex)QB_THREAD_LOCK_LONG==mutex

Return Value

       pointer to qb_thread_lock_type_t or NULL on error.

See Also

qb_util_nano_current_get(3), qb_util_stopwatch_stop(3), qb_util_stopwatch_split(3),
       qb_util_stopwatch_split_ctl(3), qb_thread_unlock(3), qb_strerror_r(3),
       qb_util_stopwatch_time_split_get(3), qb_util_set_log_function(3), qb_util_timespec_from_epoch_get(3),
       qb_thread_lock_destroy(3), qb_thread_trylock(3), qb_util_nano_monotonic_hz(3),
       qb_util_nano_from_epoch_get(3), qb_util_stopwatch_create(3), qb_util_stopwatch_split_last(3),
       qb_thread_lock(3), qb_util_stopwatch_free(3), qb_timespec_add_ms(3), qb_util_stopwatch_start(3),
       qb_util_stopwatch_us_elapsed_get(3), qb_util_stopwatch_sec_elapsed_get(3)

Structures

enumqb_thread_lock_type_t{QB_THREAD_LOCK_SHORT;QB_THREAD_LOCK_LONG;};

Synopsis

#include<qb/qbutil.h>qb_thread_lock_t*qb_thread_lock_create(
           /**QB_THREAD_LOCK_SHORT==spinlock(whereavailable,elsemutex)*QB_THREAD_LOCK_LONG==mutex*/qb_thread_lock_type_ttype);

See Also