File: al_lock_mutex.3

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (31 lines) | stat: -rw-r--r-- 830 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.TH al_lock_mutex 3 "" "Allegro reference manual"
.SH NAME
.PP
al_lock_mutex \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

void\ al_lock_mutex(ALLEGRO_MUTEX\ *mutex)
\f[]
.fi
.SH DESCRIPTION
.PP
Acquire the lock on \f[C]mutex\f[].
If the mutex is already locked by another thread, the call will block
until the mutex becomes available and locked.
.PP
If the mutex is already locked by the calling thread, then the behaviour
depends on whether the mutex was created with al_create_mutex(3) or
al_create_mutex_recursive(3).
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.
.SH SEE ALSO
.PP
al_unlock_mutex(3).
.PP
\f[B]We don\[aq]t yet have al_mutex_trylock.\f[]