ultrix man page for atomic_op

Query: atomic_op

OS: ultrix

Section: 2

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

atomic_op(2)							System Calls Manual						      atomic_op(2)

Name
       atomic_op - perform test and set operation.

Syntax
       #include <sys/lock.h>

       int atomic_op(op, addr)
       int op;
       int *addr;

Arguments
       op	      This argument is the operation type.  If the operation type is ATOMIC_SET, this call specifies the test and set operation on
		      location addr.  If the operation type is ATOMIC_CLEAR, this call specifies the clear operation on location addr.

       addr	      This is the target address of the operation.

Description
       The call provides test and set operation at a user address.

       For RISC systems, is executed as a system call.	For VAX systems, a system call is not executed for this library function.

Return Values
       If the atomic_op operation succeeds, then 0 is returned.  Otherwise a -1 is returned, and a more specific error code is stored in errno.

Diagnostics
       [EBUSY]	      The location specified by addr is already set.

       [EINVAL]       The op is not a valid operation type.

       [EACCES]       The address specified in addr is not write accessible.

       [EALIGN]       The addr is not on an integer boundary.

																      atomic_op(2)
Related Man Pages
mprotect(2) - opensolaris
shmdt(2) - freebsd
quotactl(7i) - sunos
accept(2) - ultrix
munmap(2) - ultrix
Similar Topics in the Unix Linux Community
system calls and atomic operation
Atomic Operations