117 Commits

Author SHA1 Message Date
Felix Salcher
a325ab469f add timerfd_* syscall wrappers 2025-12-13 17:27:32 +01:00
Jeroen van Rijn
3fc0320449 Merge pull request #5741 from FourteenBrush/patch-4
Make `linux.IO_Vec.base` a multipointer
2025-12-10 18:09:01 +00:00
bc-universe
9712624e04 Implement more Linux syscalls (#5705)
* 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>
2025-11-24 12:14:17 +01:00
Laytan
3db76bc367 sys/linux: add io uring API 2025-11-10 20:03:57 +01:00
Chris Hayen
492653e316 conditional packed for EPoll_Event to match kernel 2025-10-21 12:37:28 -04:00
FourteenBrush
4a8d84c107 Make linux.IO_Vec.base a multipointer 2025-10-02 00:04:24 +02:00
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
Raph
a7e89e1324 Merge branch 'master' into tiocgwinsz_time 2025-06-20 16:50:00 -01:00
RaphGL
0b5be6ad6a added TIOCGWINSZ to darwin, linux and freebsd 2025-06-20 16:45:05 -01:00
Feoramund
0747032e4a Use idiomatic rawptr(nil) 2025-06-08 17:48:06 -04:00
Jeroen van Rijn
d2d187eaaa Work around untyped nil 2025-06-08 22:53:52 +02:00
Tohei Ichikawa
7662e7d843 Removed obsolete tz param from gettimeofday 2025-06-08 16:07:11 -04:00
Tohei Ichikawa
876f1c02b7 Added missing parameter to gettimeofday 2025-06-08 12:47:50 -04:00
Krzesimir Nowak
3519cecb7c Formatting fixes 2025-05-18 15:25:17 +02:00
Krzesimir Nowak
306d3a16c4 sys/linux: Improve documentation for Dirent and related procedures 2025-05-17 20:05:51 +02: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
jason
4998d4ebd0 Fix linux.dirent_name
Was not searching the first possible byte for 0.
2025-04-13 12:05:39 -04:00
Harold Brenes
c5980ba6c4 Add linux build tag to core/sys/linux/sys.odin 2025-04-02 16:39:25 -04:00
Wison Ye
01e81fe597 Fixed #4892: 'EPoll_Event.events' should be bit set. 2025-03-22 17:51:08 +13:00
jason
ae02ced175 Fix linux.rt_sigaction
Add missing polymorphic parameter to Sig_Action
2025-03-10 20:27:59 -04:00
latedeployment
0491ad55f4 Add missing syscalls from map_shadow_stack to removexattrat 2025-03-07 21:54:51 +02:00
gingerBill
539a74c2a9 Fix bindings for sys/linux and posix/unistd.odin 2025-01-31 08:37:43 +00:00
candtechsoftware
97db18c09a Added IP_ADD_MEMBERSHIP Socket Option on Linux 2025-01-29 23:12:32 -05:00
jason
c11dccf210 make -vet happy 2025-01-10 20:59:48 -05:00
jason
fa7ef28acf Implement _read_directory_iterator in os2.
Also, fix minor bug in linux.dirent_name.
2025-01-10 20:54:09 -05:00
jason
1221e393f7 add 32 bit Sig_Info and remove ppoll_time64 call 2025-01-03 09:29:39 -05:00
jason
074bef7baf Fix sys/linux 64 bit arguments on 32 bit systems
Reverese return values of compat64_arg_pair
Add register alignment to specific arm32 system calls
2025-01-02 14:50:45 -05:00
jason
ce1f3b34c0 Minor fixes + cleanup in os2 and sys/linux
Add NOFOLLOW to os2.remove
Change Dev from int to u64 and make relavant casts
Fix compat64_arg_pair
2025-01-02 11:03:24 -05:00
gingerBill
8a5c1b109d Merge pull request #4613 from fnknda/fix-linux-bind
Fix calls to bind always returning EINVAL when using linux.Sock_Addr_In
2025-01-01 17:46:15 +00:00
Joao Fukuda
28e226381d Remove extra white space
Got in on 0a2200f without me noticing, mb.
2024-12-22 16:09:51 -03:00
Joao Fukuda
0a2200fa12 Fix issue #4612 2024-12-22 15:53:54 -03: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
37441bd730 core:sys/linux - fixed vet errors 2024-11-13 00:09:38 -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
flysand7
e54b1560ee Add missing registers in User_Regs on AMD64 2024-09-26 07:27:11 +11:00
gingerBill
6bbeb0a243 Merge pull request #4203 from karl-zylinski/file-tags-without-comments
Make tags use #+ syntax instead of //+
2024-09-19 12:36:43 +01:00
flysand7
833157ecc9 [sys/linux]: Fix the order of arguments for ptrace cont, singlestep and syscall 2024-09-18 07:52:22 +11:00
Karl Zylinski
19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
laytan
35731e66cf sys/info: more CPU feature detection for RISC-V 2024-09-02 14:06:19 +00:00
gingerBill
70932dc478 Merge pull request #4089 from laytan/riscv64
add support for linux_riscv64 and freestanding_riscv64
2024-08-22 11:20:03 +01:00
Laytan
c0125f3192 correct the riscv64 stat structs 2024-08-21 14:41:23 +02:00
Yeongju Kang
bbe4c32e32 changed signature of clock_getres 2024-08-21 08:25:14 +09:00
Laytan
ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
Yeongju Kang
f96991364a implement clock_settime, clock_getres and clock_nanosleep 2024-08-19 08:53:07 +09:00