al_lock_mutex(3alleg5)

al_lock_mutex3alleg5

Allegro 5 api

Usage

#include <allegro5/allegro.h>
void al_lock_mutex(ALLEGRO_MUTEX *mutex)

Overview

Acquire the lock on mutex. If the mutex is already locked by another thread, the call will block until the mutex becomes available and locked.

If the mutex is already locked by the calling thread, then the behaviour depends on whether the mutex was created with al_create_mutex(3alleg5) or al_create_mutex_recursive(3alleg5). In the former case, the behaviour is undefined; the most likely behaviour is deadlock. In the latter case, the count in the mutex will be incremented and the call will return immediately.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From allegro5-doc 2:5.2.10.1+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.