# Generate linux syscalls via\. the linux source tree · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a4369918b19e4920f51f40a2b05781dda45462f7)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a4369918b19e4920f51f40a2b05781dda45462f7

Requested commit: a4369918b19e4920f51f40a2b05781dda45462f7

Commit: a4369918b19e4920f51f40a2b05781dda45462f7

Tree: 191bce0ce71a418575909ea73b6e193d5f4a800f

Author: Stephen Gregoratto

Committer: Andrew Kelley

## Message

```
Generate linux syscalls via. the linux source tree

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.

```

## Parents

- [6d27341b96240a4ae70c794eb05dec452fd31451](https://git.cafe/gitcafe/zig/commit/6d27341b96240a4ae70c794eb05dec452fd31451?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a4369918b19e4920f51f40a2b05781dda45462f7?format=markdown)
