* Implement some more Linux syscalls
* Fixed typo and removed stray comments
* Correct types for some syscalls
* Fix types and add variadic argument for prctl
* flag fixes
* when x86/amd64 only
* more fixes
---------
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
In #5399 it was noticed, that IPC_Mode isn't being used within SystemV
IPC procedures, even though it was designed this way, which lead to a
weird API where in order to call SystemV IPC procedures multiple
transmutes and a bitwise-OR are needed.
This unifies IPC_Mode and IPC_Flags bitsets, making it possible to call
the SystemV IPC procedures without extra casts, and rearranges the flags
in a way that hopefully makes it easier to see when they are not
colliding and should not be mixed. The explanation, explaining this
arrangement of the enum was added.
The IPC_Perm structure is modified, so that the flags can be re-used
between the calls. It's probably not as good as keeping them separate,
but should work... hopefully.
Kept the "old" style of documentation for consistency.
Signed-off-by: Sunagatov Denis <thebumboni@gmail.com>
Fixes#5151
- Removes `SHARED_VALIDATE` from the enum and turns it into `Map_Shared_Validate :: Map_Flags{.SHARED, .PRIVATE}` so it has the proper value of 0x03.
- Adds `DROPPABLE`.
- Adds constants `MAP_HUGE_SHIFT` and `MAP_HUGE_MASK`.
- Adds the huge page precomputed constants from `mman.h`, defined as the log2 of the size shifted left by `MAP_HUGE_SHIFT`:
Map_Huge_16KB
Map_Huge_64KB
Map_Huge_512KB
Map_Huge_1MB
Map_Huge_2MB
Map_Huge_8MB
Map_Huge_16MB
Map_Huge_32MB
Map_Huge_256MB
Map_Huge_512MB
Map_Huge_1GB
Map_Huge_2GB
Map_Huge_16GB
Readded open flags for arm64 to sys/linux/bits.odin. Make process_start
name based instead of descriptor based to allow running of scripts. Fix
bug in heap_linux. Fix and simplify os2.remove.