mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
[bitops] Add generic atomic bit test, set, and clear functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
19
src/include/ipxe/bitops.h
Normal file
19
src/include/ipxe/bitops.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _IPXE_BITOPS_H
|
||||
#define _IPXE_BITOPS_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Bit operations
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <bits/bitops.h>
|
||||
|
||||
void set_bit ( unsigned int bit, volatile void *bits );
|
||||
void clear_bit ( unsigned int bit, volatile void *bits );
|
||||
int test_and_set_bit ( unsigned int bit, volatile void *bits );
|
||||
int test_and_clear_bit ( unsigned int bit, volatile void *bits );
|
||||
|
||||
#endif /* _IPXE_BITOPS_H */
|
||||
Reference in New Issue
Block a user