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
Unknown Object (File)
Mon, Apr 6, 9:52 PM
Unknown Object (File)
Mon, Apr 6, 3:14 PM
Unknown Object (File)
Sun, Apr 5, 2:28 PM
Unknown Object (File)
Sun, Apr 5, 6:48 AM
Unknown Object (File)
Sun, Apr 5, 6:04 AM
Unknown Object (File)
Thu, Apr 2, 3:21 AM
Unknown Object (File)
Wed, Apr 1, 5:27 AM
Unknown Object (File)
Mon, Mar 30, 8:10 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