sg_lock_mutex(3)

sg_lock_mutex3

Guard not mt-safe system api

Usage

FC#include <statgrab.h>F[0]

FCsg_error sg_lock_mutexF[0] FC(char const *mutex_name);F[0]

FCsg_error sg_unlock_mutexF[0] FC(char const *mutex_name);F[0]

Overview

Return values

Both functions return a statgrab error code.

error code: SG_ERROR_NONE
description: No error

error code: SG_ERROR_INVALID_ARGUMENT
description: Unknown name for mutex

error code: SG_ERROR_MUTEX_LOCK
description: thread library error, error code is set with the delivered value

error code: SG_ERROR_MUTEX_UNLOCK
description: thread library error, error code is set with the delivered value

Website

⟨https://libstatgrab.org/⟩

Releases

7 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8–10
  2. 11
  3. 12–13
  4. Arch

From libstatgrab 0.92.1-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.