Page MenuHomeFreeBSD

{amd64,i386}/SYS.h: add _SYSCALL and _SYSCALL_BODY
ClosedPublic

Authored by brooks on Dec 14 2023, 1:21 AM.
Tags
None
Referenced Files
F140529536: D43059.id.diff
Wed, Dec 24, 10:53 PM
Unknown Object (File)
Wed, Nov 26, 11:07 PM
Unknown Object (File)
Nov 25 2025, 1:18 AM
Unknown Object (File)
Nov 25 2025, 1:18 AM
Unknown Object (File)
Nov 25 2025, 1:18 AM
Unknown Object (File)
Nov 25 2025, 1:18 AM
Unknown Object (File)
Nov 25 2025, 1:17 AM
Unknown Object (File)
Nov 23 2025, 8:51 AM
Subscribers

Details

Summary

Add a _SYSCALL(name) which calls the SYS_name syscall. Use it to add a
_SYSCALL_BODY() macro which invokes the syscall and calls cerror as
required. Use the latter to implement PSEUDO() and RSYSCALL().

Sponsored by: DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks created this revision.

This is part of a set of changes I've posted at https://github.com/brooksdavis/freebsd/tree/SYS.h-unification. I've done basic smoke testing of amd64 under qemu, i386 might need more testing.

This revision is now accepted and ready to land.Dec 14 2023, 1:31 AM
lib/libc/amd64/SYS.h
39
45

We're inconsistent about whether the macro ends with a semicolon.

It would also be more consistent to keep one instruction per line.

lib/libc/i386/SYS.h
39

Address formatting issues pointed out by @markj

This revision now requires review to proceed.Dec 14 2023, 8:29 PM
This revision is now accepted and ready to land.Dec 15 2023, 2:31 PM