qb_thread_lock_create(3)

qb_thread_lock_create3

Create a new lock of the given type.

Usage

#include <qb/qbutil.h>

qb_thread_lock_t * qb_thread_lock_create(
    /*
     * QB_THREAD_LOCK_SHORT == spinlock (where available, else mutex)
     * QB_THREAD_LOCK_LONG == mutex
     */
    qb_thread_lock_type_t  type
);

Params

type QB_THREAD_LOCK_SHORT == spinlock (where available, else mutex) QB_THREAD_LOCK_LONG == mutex

Overview

Structures

enum qb_thread_lock_type_t {
      QB_THREAD_LOCK_SHORT;
      QB_THREAD_LOCK_LONG;
};

Return value

pointer to qb_thread_lock_type_t or NULL on error.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

From libqb 2.0.10-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.