.\" Automatically generated man page, do not edit .TH QB_THREAD_LOCK_CREATE 3 2023-07-21 "LIBQB" "libqb Programmer's Manual" .SH NAME qb_thread_lock_create \- Create a new lock of the given type. .SH SYNOPSIS .nf .B #include .sp \fBqb_thread_lock_t * qb_thread_lock_create\fP( \fP /* * QB_THREAD_LOCK_SHORT == spinlock (where available, else mutex) * QB_THREAD_LOCK_LONG == mutex */ \fBqb_thread_lock_type_t \fP\fItype\fP ); .fi .SH PARAMS \fBtype \fP\fIQB_THREAD_LOCK_SHORT == spinlock (where available, else mutex) QB_THREAD_LOCK_LONG == mutex \fP .PP .SH DESCRIPTION .SH STRUCTURES .nf \fB enum qb_thread_lock_type_t { \fR \fB \fB \fP\fIQB_THREAD_LOCK_SHORT\fP; \fB \fB \fP\fIQB_THREAD_LOCK_LONG\fP; }; \fP .fi .PP .RE .SH RETURN VALUE .PP pointer to qb_thread_lock_type_t or NULL on error. .PP .SH SEE ALSO .PP .nh .ad l \fIqb_util_nano_current_get\fR(3), \fIqb_util_stopwatch_stop\fR(3), \fIqb_util_stopwatch_split\fR(3), \fIqb_util_stopwatch_split_ctl\fR(3), \fIqb_thread_unlock\fR(3), \fIqb_strerror_r\fR(3), \fIqb_util_stopwatch_time_split_get\fR(3), \fIqb_util_set_log_function\fR(3), \fIqb_util_timespec_from_epoch_get\fR(3), \fIqb_thread_lock_destroy\fR(3), \fIqb_thread_trylock\fR(3), \fIqb_util_nano_monotonic_hz\fR(3), \fIqb_util_nano_from_epoch_get\fR(3), \fIqb_util_stopwatch_create\fR(3), \fIqb_util_stopwatch_split_last\fR(3), \fIqb_thread_lock\fR(3), \fIqb_util_stopwatch_free\fR(3), \fIqb_timespec_add_ms\fR(3), \fIqb_util_stopwatch_start\fR(3), \fIqb_util_stopwatch_us_elapsed_get\fR(3), \fIqb_util_stopwatch_sec_elapsed_get\fR(3) .ad .hy .SH "COPYRIGHT" .PP Copyright (C) 2010-2020 Red Hat, Inc.