Commit Graph

33 Commits

Author SHA1 Message Date
diniamo
88dba1194a Fix ITimer_Flags_Bits enum value 2025-08-14 15:01:42 +02:00
Sunagatov Denis
e21cde0cf7 sys/linux: Unify IPC_Flags and IPC_Mode bitsets
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>
2025-06-24 20:30:50 +11:00
Jeroen van Rijn
be24feb862 Move things to constants.odin 2025-05-12 17:13:59 +02:00
Jeroen van Rijn
dec3d6959d Update linux.Map_Flags_Bits
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
2025-05-12 16:45:51 +02:00
Wison Ye
01e81fe597 Fixed #4892: 'EPoll_Event.events' should be bit set. 2025-03-22 17:51:08 +13:00
candtechsoftware
97db18c09a Added IP_ADD_MEMBERSHIP Socket Option on Linux 2025-01-29 23:12:32 -05:00
jason
b73275cf42 Get arm64 up to speed in os2 linux
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.
2024-12-19 17:12:07 -05:00
A1029384756
8f80e9765e core:sys/linux - prefixing + moved IN_CLOSE/IN_MOVE to constants 2024-11-13 12:45:58 -05:00
A1029384756
1b313a4db0 core:sys/linux - flags, spacing, inotify_init 2024-11-13 08:52:33 -05:00
A1029384756
bb20338987 core:sys/linux - implemented inotify
core:sys/linux - added constants and spacing
2024-11-13 00:05:58 -05:00
Laytan
0157ff1541 Merge pull request #4118 from andradei/posix-linux
Linux POSIX support
2024-10-13 20:05:03 +02:00
Laytan
5cd1784d41 review/correct/cleanup posix linux PR 2024-09-30 16:00:46 +02:00
laytan
35731e66cf sys/info: more CPU feature detection for RISC-V 2024-09-02 14:06:19 +00:00
Laytan
ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
jason
c4d43bbab0 os2 linux process_wait rework; add Sig_Child_Code to sys/linux bits 2024-08-09 09:16:44 -04:00
gingerBill
62f455f47b Merge branch 'master' into syscall-fix 2024-07-19 11:43:56 +01:00
flysand7
7b501b22bb [os2]: Split file type from mode bits 2024-07-18 23:09:27 +11:00
gingerBill
5413a8b744 Even more style fixes 2024-06-29 19:11:36 +01:00
jason
a15cbc474d change error strings to an enumerated array in rodata; print_error takes a file argument 2024-06-28 07:45:24 -04:00
jason
f22754fc90 sys/linux: fix some syscalls and types; add more to Sig_Action and Sig_Info; Pid int->i32 2024-06-27 16:29:47 -04:00
Laytan Laats
eaab17f8fb sys/linux: fix open bits 2024-05-05 14:16:21 +02:00
flysand7
9ffa4a4eb1 [sys/linux]: Fix bit numbers for open flags 2024-05-01 05:24:02 +11:00
PucklaJ
7f301790d0 [sys/linux] Change flags parameter of execveat to bit_set 2024-04-28 11:48:18 +02:00
flysand7
cc185d98b4 [sys/linux]: Fix numeric values for socket fd flags 2024-02-18 23:04:41 +11:00
flysand7
92d3a681cd Merge branch 'master' into sys-linux-additions 2023-12-06 00:23:41 +11:00
flysand7
03282c1234 [sys/linux]: Add epoll syscalls 2023-11-24 09:39:36 +11:00
flga
6de2b7700f core:sys/linux: make Perf_Read_Format a bitset 2023-11-10 12:58:53 +00:00
flysand7
f26ed39e86 [sys/linux]: Fix compilation errors and -strict-style errors 2023-11-04 13:57:28 +11:00
flysand7
574d2baf09 [sys/linux]: Documentation improvements 2023-11-04 13:35:13 +11:00
flysand7
1e622979f8 [sys/linux]: Add more syscalls 2023-11-04 12:46:45 +11:00
flysand7
7faa146004 WIP 2023-11-03 00:56:20 +11:00
flysand7
bbd4c1054e convert spaces to tabs 2023-10-27 11:30:13 +11:00
flysand7
4d65b1ab9c Implement new sys/unix package 2023-10-27 10:51:21 +11:00