mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[util] Remove enum_bitfields
The enum_bitfields system never worked quite right, and always had edge cases where name resolution for the SFINAE would fail. Move everything over to use util::bitset, which can be constexpr and boils down to inline integer bitops in release mode. Improved util::bitset itself, moving the array-backed base implementation into a new util::sized_bitset, and making the single-inttype backed implementation the base case. Also added a distinction between | or |= (which work with real bit values) and + or += (which work with bit indexes).
This commit is contained in:
@@ -126,8 +126,7 @@ isr_handler(cpu_state *regs)
|
||||
// The zero page is always invalid
|
||||
if (cr2 > mem::frame_size) {
|
||||
bool user = cr2 < mem::kernel_offset;
|
||||
vm_space::fault_type ft =
|
||||
static_cast<vm_space::fault_type>(regs->errorcode);
|
||||
util::bitset8 ft = regs->errorcode;
|
||||
|
||||
vm_space &space = user
|
||||
? obj::process::current().space()
|
||||
|
||||
Reference in New Issue
Block a user