pthread_mutexattr_setkind_np(3)

pthread_mutexattr_setkind_np3

Deprecated mutex creation attributes

Usage

#include <pthread.h>

int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind); int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr, int *kind);

Overview

These functions are deprecated, use pthread_mutexattr_settype(3) and pthread_mutexattr_gettype(3) instead.

Return value

pthread_mutexattr_getkind_np() always returns 0.

pthread_mutexattr_setkind_np() returns 0 on success and a non-zero error code on error.

Errors

On error, pthread_mutexattr_setkind_np() returns the following error code:

EINVAL

kind is neither PTHREAD_MUTEX_FAST_NP nor PTHREAD_MUTEX_RECURSIVE_NP nor PTHREAD_MUTEX_ERRORCHECK_NP.

Releases

12 releases since Debian 3.1 (Sarge); the text changed 4 times.

  1. 3.1
  2. 4.0–5.0
  3. 6.0–12
  4. 13
  5. Arch

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