PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Bit Operations

Boolean TestAndSet(
                     UInt32 bit
                     UInt8 *startAddress);
Boolean TestAndClear(
                     UInt32 bit
                     UInt8 *startAddress);
--> bit
The bit number in the range 0 through 7.
--> startAddress
The address of the byte in which the bit is located.
DESCRIPTION

TestAndSet sets and TestAndClear clears a single bit in a byte at a specified address. They return true if the bit was already set or cleared respectively and false otherwise.

EXECUTION CONTEXT

TestAndSet and TestAndClear may be called from task level, secondary interrupt level, or hardware interrupt level.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)