Page MenuHomeFreeBSD

libsys: add a libsys.h

Authored by brooks on Mar 15 2024, 10:47 PM.
Referenced Files
Unknown Object (File)
Fri, May 31, 8:42 PM
Unknown Object (File)
Tue, May 28, 9:17 PM
Unknown Object (File)
May 9 2024, 9:56 AM
Unknown Object (File)
May 9 2024, 2:36 AM
Unknown Object (File)
May 7 2024, 10:36 PM
Unknown Object (File)
May 6 2024, 10:54 AM
Unknown Object (File)
May 4 2024, 1:23 PM
Unknown Object (File)
Apr 30 2024, 9:03 AM



This declares an API for libsys which currently consists of
sys_<foo>() declarations for system call stubs and function pointer
typedefs of the form
sys_<foo>_t. The vast majority of the
implementation resides in a generated _libsys.h which ensures that all
system call stub declarations match syscalls.master.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

declEration typo in the description

This revision is now accepted and ready to land.Mar 16 2024, 2:35 AM

Does __BEGIN_DECLS provide enough force to make compiler attach the right call ABI to the typedef'ed function types?


My thought was that it prevents them from being name mangled in C++, but even there I'm not sure it matters on any architecture we care about? Maybe there would otherwise be an edge case where type promotion differences were an issue. It might be we don't need this around the typedefs.


We didn't need that before, when typedefs were used only internally by libc. Now since they are exposed, it is more subtle.

brooks edited the summary of this revision. (Show Details)

Use wait.h rather than _idtype.h

This revision now requires review to proceed.Mar 19 2024, 11:31 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 16 2024, 4:50 PM
Closed by commit rG1fd880742ace: libsys: add a libsys.h (authored by brooks). · Explain Why
This revision was automatically updated to reflect the committed changes.