Page MenuHomeFreeBSD

libsys: add a libsys.h
ClosedPublic

Authored by brooks on Mar 15 2024, 10:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 2:06 PM
Unknown Object (File)
Thu, Oct 31, 4:57 PM
Unknown Object (File)
Wed, Oct 23, 3:10 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Unknown Object (File)
Oct 2 2024, 5:07 AM
Unknown Object (File)
Sep 25 2024, 5:29 PM
Unknown Object (File)
Sep 20 2024, 7:10 AM
Unknown Object (File)
Sep 15 2024, 10:43 PM
Subscribers

Details

Summary

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

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56640
Build 53528: arc lint + arc unit

Event Timeline

declEration typo in the description

This revision is now accepted and ready to land.Mar 16 2024, 2:35 AM
lib/libsys/_libsys.h
67

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

lib/libsys/_libsys.h
67

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.

lib/libsys/_libsys.h
67

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.