P99

◆ p99_count_inc_conditionally

#define p99_count_inc_conditionally (   p99_count volatile *p00_c,
  unsignedp00_hm 
)    P99_CALL_DEFARG(p99_count_inc_conditionally, 2, __VA_ARGS__)
related

increment the counter p00_c atomically by p00_hm but only if it is not zero before.

Returns
the value of the counter before the increment.
Remarks
p00_hm defaults to 1 if omitted.
p99_count_inc_conditionally is actually implemented as a macro that helps to provide default arguments to the real function.
See also
P99_CALL_DEFARG
P99_DECLARE_DEFARG

Definition at line 100 of file p99_count.h.