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)
Apr 27 2024, 3:57 PM
Unknown Object (File)
Apr 27 2024, 3:57 PM
Unknown Object (File)
Apr 27 2024, 3:57 PM
Unknown Object (File)
Apr 27 2024, 3:57 PM
Unknown Object (File)
Apr 27 2024, 2:26 PM
Unknown Object (File)
Feb 18 2024, 4:50 AM
Unknown Object (File)
Feb 11 2024, 10:33 AM
Unknown Object (File)
Jan 28 2024, 2:34 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