14890 unix: dboot should use efi memory map if present
[illumos-gate.git] / usr / src / uts / common / sys / bitext.h
blob9baa6b592e209d83c405d12dc24e639c30b77646
1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2022 Oxide Computer Company
16 #ifndef _SYS_BITEXT_H
17 #define _SYS_BITEXT_H
19 #include <sys/types.h>
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
26 * A bunch of routines to make working with bits and registers easier. This is
27 * designed to be a replacement for the BITX macro and provide additional error
28 * handling. See bitx64(9F), bitdel64(9F), and bitset64(9F) for more
29 * information.
32 extern uint8_t bitx8(uint8_t, uint_t, uint_t);
33 extern uint16_t bitx16(uint16_t, uint_t, uint_t);
34 extern uint32_t bitx32(uint32_t, uint_t, uint_t);
35 extern uint64_t bitx64(uint64_t, uint_t, uint_t);
37 extern uint8_t bitset8(uint8_t, uint_t, uint_t, uint8_t);
38 extern uint16_t bitset16(uint16_t, uint_t, uint_t, uint16_t);
39 extern uint32_t bitset32(uint32_t, uint_t, uint_t, uint32_t);
40 extern uint64_t bitset64(uint64_t, uint_t, uint_t, uint64_t);
42 extern uint64_t bitdel64(uint64_t, uint_t, uint_t);
44 #ifdef __cplusplus
46 #endif
48 #endif /* _SYS_BITEXT_H */