Changed PackedNext implementation to preserve ARM TBI/PAC/MTE pointer metadata:
- Store full usize pointer with auto_delete flag in LOW alignment bit (not high bit)
- ConcurrentTask is 8-byte aligned (contains u64 Task), so low bit is guaranteed zero
- Use enum(usize) { zero = 0, _ } for type safety and clean initialization syntax
- All atomic operations use usize (instead of u64) with @intFromEnum/@enumFromInt
- Masks: AUTO_DELETE_MASK=0x1, POINTER_MASK=~0x1
Benefits:
- Preserves all high pointer metadata (ARM pointer authentication, tagging, etc.)
- Uses guaranteed-zero low alignment bits instead of truncating address space
- Type-safe enum wrapper prevents accidental misuse
- Clean .zero initialization syntax
Pack the auto_delete boolean into the lowest bit of the next pointer in
ConcurrentTask, reducing memory usage by 33% (from 24 to 16 bytes).
Implementation details:
- Created PackedNext struct that packs u63 pointer + bool into u64
- Extended UnboundedQueue to support packed pointer types via
UnboundedQueuePacked function
- Added getter/setter helpers to abstract packed vs unpacked access
- All atomic operations properly handle packed pointer unpacking
- Added compile-time assertion to ensure ConcurrentTask is 16 bytes
The next pointer uses only 63 bits since pointers on 64-bit systems
don't use the full address space, leaving the LSB for the auto_delete flag.