Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ _Test_and_Set(3c) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hc(1)

gettid(2)



test_and_set(3C)              CX/UX              test_and_set(3C)



NAME
     TestandSet - atomic test-and-set primitive

SYNOPSIS
     int TestandSet (p)
     int *p;

DESCRIPTION
     TestandSet atomically sets *p to some unspecified non-
     zero value and returns the previous contents of *p, under
     the assumption that TestandSet 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), reschedcntl(2), serverblock(2),
     clientblock(2).

WARNING
     Do not use TestandSet in I/O space.
































Page 1                        CX/UX Programmer's Reference Manual



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026