1QB_THREAD_LOCK_CREATE(3)   libqb Programmer's Manual  QB_THREAD_LOCK_CREATE(3)
2
3
4

NAME

6       qb_thread_lock_create - Create a new lock of the given type.
7
8

SYNOPSIS

10       #include <qb/qbutil.h>
11
12       qb_thread_lock_t* qb_thread_lock_create(
13           /*
14            * QB_THREAD_LOCK_SHORT == spinlock (where available, else mutex)
15            * QB_THREAD_LOCK_LONG == mutex
16            */
17           qb_thread_lock_type_t  type
18       );
19

PARAMS

21       type QB_THREAD_LOCK_SHORT
22

DESCRIPTION

STRUCTURES

25       enum qb_thread_lock_type_t {
26             QB_THREAD_LOCK_SHORT;
27             QB_THREAD_LOCK_LONG;
28       };
29

RETURN VALUE

31       pointer to qb_thread_lock_type_t or NULL on error.
32

SEE ALSO

34       qb_util_nano_current_get(3), qb_util_stopwatch_stop(3),
35       qb_util_stopwatch_split(3), qb_util_stopwatch_split_ctl(3),
36       qb_thread_unlock(3), qb_strerror_r(3),
37       qb_util_stopwatch_time_split_get(3), qb_util_set_log_function(3),
38       qb_util_timespec_from_epoch_get(3), qb_thread_lock_destroy(3),
39       qb_thread_trylock(3), qb_util_nano_monotonic_hz(3),
40       qb_util_nano_from_epoch_get(3), qb_util_stopwatch_create(3),
41       qb_util_stopwatch_split_last(3), qb_thread_lock(3),
42       qb_util_stopwatch_free(3), qb_timespec_add_ms(3),
43       qb_util_stopwatch_start(3), qb_util_stopwatch_us_elapsed_get(3),
44       qb_util_stopwatch_sec_elapsed_get(3)
45
47       Copyright (C) 2010-2020 Red Hat, Inc.
48
49
50
51LIBQB                             2021-11-12          QB_THREAD_LOCK_CREATE(3)
Impressum