test_and_set(3C) — CX/UX
NAME
_Test_and_Set − atomic test-and-set primitive
SYNOPSIS
int _Test_and_Set (p)
int ∗p;
DESCRIPTION
_Test_and_Set atomically sets ∗p to some unspecified non-zero value and returns the previous contents of ∗p, under the assumption that _Test_and_Set is the ONLY means by which ∗p acquires a non-zero value.
When the -F option is used on the hc compiler, this routine is expanded in line. See hc(1).
SEE ALSO
CX/UX Programmer’s Guide.
hc(1). gettid(2), resched_cntl(2), server_block(2), client_block(2).
WARNING
Do not use Test_and_Set in I/O space.
CX/UX Programmer’s Reference Manual