aboutsummaryrefslogtreecommitdiff
path: root/tools/generate_linux_syscalls.zig
AgeCommit message (Collapse)Author
2025-08-30update tools and other miscellaneous things to new APIsAndrew Kelley
2025-08-14Rewrite `generate_linux_syscalls` to be completely table basedStephen Gregoratto
Changes by Arnd Bergmann have migrated all supported architectures to use a table for their syscall lists. This removes the need to use the C pre-processor and simplifies the logic considerably. All currently supported architectures have been added, with the ones Zig doesn't support being commented out. Speaking of; OpenRisc has been enabled for generation.
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-07-16tools: fix some bitrotAlex Rønne Petersen
2025-07-07update standalone and incremental tests to new APIAndrew Kelley
2024-11-02generate_linux_syscalls: Generate syscalls for x32.Alex Rønne Petersen
Also update the syscalls file based on Linux 6.10. No diffs other than x32.
2024-10-03generate_linux_syscalls: Rename mmap_pgoff to mmap2.Alex Rønne Petersen
2024-08-09fix(fmt): remove additional trailing newlineippsav
2024-08-05Rewrite `generate_linux_syscalls.zig` (#20895)ippsav
refactors the syscall generation tool aiming to reduce code duplication for both the table based arches and the ones generated using a preprocessor.
2024-07-30generate_linux_syscalls: Skip some reserved syscalls on mips and xtensa.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for xtensa.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for m68k.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for s390x.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for mips n32.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for sparc32.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for hexagon.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for csky.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Add generation code for arc.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Name mips types according to ABI.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Don't expose the helper constants on mips/mips64.Alex Rønne Petersen
2024-07-30generate_linux_syscalls: Simplify include paths.Alex Rønne Petersen
Using the tooling includes means we won't run into the asm/bitsperlong.h issue.
2024-07-30generate_linux_syscalls: Bring loongarch64 generation code in line with ↵Alex Rønne Petersen
other newer ports.
2024-07-29generate_linux_syscalls: Rework generation strategy for newer kernel ports.Alex Rønne Petersen
If we're going to abuse the preprocessor, we may as well go all the way and have it generate a convenient format for us. This achieves two things: 1. We no longer need hacks for the arch-specific syscalls. 2. We now generate the correct syscall names for 32-bit platforms. The latter is because we now resolve __SC_3264, etc.
2024-07-29generate_linux_syscalls: Add some missing include paths for riscv.Alex Rønne Petersen
2024-07-29generate_linux_syscalls: Add riscv32 support.Alex Rønne Petersen
2024-07-29generate_linux_syscalls: Handle riscv_hwprobe.Alex Rønne Petersen
2024-06-05generate loongarch64 Linux syscallsYANG Xudong
2024-05-26std: restructure child process namespaceAndrew Kelley
2024-04-22ComptimeStringMap: return a regular struct and optimizeTravis Staloch
this patch renames ComptimeStringMap to StaticStringMap, makes it accept only a single type parameter, and return a known struct type instead of an anonymous struct. initial motivation for these changes was to reduce the 'very long type names' issue described here https://github.com/ziglang/zig/pull/19682. this breaks the previous API. users will now need to write: `const map = std.StaticStringMap(T).initComptime(kvs_list);` * move `kvs_list` param from type param to an `initComptime()` param * new public methods * `keys()`, `values()` helpers * `init(allocator)`, `deinit(allocator)` for runtime data * `getLongestPrefix(str)`, `getLongestPrefixIndex(str)` - i'm not sure these belong but have left in for now incase they are deemed useful * performance notes: * i posted some benchmarking results here: https://github.com/travisstaloch/comptime-string-map-revised/issues/1 * i noticed a speedup reducing the size of the struct from 48 to 32 bytes and thus use u32s instead of usize for all length fields * i noticed speedup storing KVs as a struct of arrays * latest benchmark shows these wall_time improvements for debug/safe/small/fast builds: -6.6% / -10.2% / -19.1% / -8.9%. full output in link above.
2024-04-07Update usages of `fmtId`/`isValidId`Carl Åstholm
`{}` for decls `{p}` for enum fields `{p_}` for struct fields and in contexts following a `.` Elsewhere, `{p}` was used since it's equivalent to the old behavior.
2023-11-19tools: correct unnecessary uses of 'var'mlugg
2023-10-22child_process + Build: rename exec to run + all related codeJan Philipp Hafer
Justification: exec, execv etc are unix concepts and portable version should be called differently. Do no touch non-Zig code. Adjust error names as well, if associated. Closes #5853.
2023-09-28gen_linux_syscalls: use default max output bytesStephen Gregoratto
Apparently, 20KiB is not enough anymore.
2023-05-13Update all std.mem.tokenize calls to their appropriate functionRyan Liptak
Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
2023-02-05Update Linux syscall list for 6.1, support Mips64Stephen Gregoratto
Follow up for #14541.
2022-05-16Generate linux syscalls via. the linux source treeStephen Gregoratto
Previously, updating the `SYS` enum for each architecture required manually looking at the syscall tables and inserting any new additions. This commit adds a tool, `generate_linux_syscalls.zig`, that automates this process using the syscall tables in the Linux source tree. On architectures without a table, it runs `zig cc` as a pre-processor to extract the system-call numbers from the Linux headers.