P99

◆ P99_MUTUAL_EXCLUDE

#define P99_MUTUAL_EXCLUDE (   MUT)    P00_MUTUAL_EXCLUDE(MUT, P99_UNIQ(mut))

Protect the following block or statement with mtx_t MUT.

See also
P99_CRITICAL for a tool that uses a spinlock that is allocated behind the scene.

This does some rudimentary error checking for the result of locking. If an error occurs the whole block and any other enclosing blocks that are protected with P99_UNWIND_PROTECT are aborted.

Warning
Restrictions on preliminary exits from the dependent block or statement apply.
See also
P99_PROTECTED_BLOCK
P99_GUARDED_BLOCK
Remarks
argument 0 maybe evaluated several times for its type but only once for its value

Definition at line 301 of file p99_threads.h.