atomic_bts

Atomically sets the specified bit in the specified memory location and returns the original value of the bit.

Library:LibC
Classification:Other
Service:General C Services

Syntax

  #include <stdlib.h> 
   
  unsigned long   atomic_bts (
     unsigned long   *addr,
     unsigned long    offset);
  

Parameters

addr

(IN) Points to the memory location for the operation.

offset

(IN) Specifies the bit position, from 0 (the least significant bit) to 31 (the most significant bit).

Return Values

Returns the original value of the bit, either 0 or 1.

Remarks

The atomic_bts function sets the bit to 1.

The memory location address is expected to be valid. If an invalid address is passed, the server will abend.

See Also

atomic_btr