iPXE
Functions
bitops.h File Reference

x86 bit operations More...

#include <stdint.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static __attribute__ ((always_inline)) void set_bit(unsigned int bit
 Set bit atomically.

Detailed Description

x86 bit operations

We perform atomic bit set and bit clear operations using "lock bts" and "lock btr". We use the output constraint to inform the compiler that any memory from the start of the bit field up to and including the byte containing the bit may be modified. (This is overkill but shouldn't matter in practice since we're unlikely to subsequently read other bits from the same bit field.)

Definition in file bitops.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static __attribute__ ( (always_inline)  ) [inline, static]

Set bit atomically.

Parameters:
bitBit to set
bitsBit field