Page MenuHomeFreeBSD

libsys: don't expose sigwait wrapper
ClosedPublic

Authored by brooks on Mar 5 2024, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 9:38 PM
Unknown Object (File)
Mon, Oct 21, 9:38 PM
Unknown Object (File)
Mon, Oct 21, 9:38 PM
Unknown Object (File)
Mon, Oct 21, 9:38 PM
Unknown Object (File)
Sat, Oct 19, 5:09 PM
Unknown Object (File)
Sat, Oct 19, 4:21 PM
Unknown Object (File)
Oct 5 2024, 2:39 AM
Unknown Object (File)
Oct 4 2024, 6:57 PM
Subscribers

Details

Summary

Long ago (e129c18a83ef) sys_sigwait was wrapped to prevent sigwait()
from returning with EINTR. Through a series of changes this wrapper
become
libc_sigwait which was internal to libc and used solely in the
interposing table. To support a move of sigwait back to libc, move this
wrapper into interposing_table and rename it with an __libsys_ prefix.

Diff Detail

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

Event Timeline

brooks requested review of this revision.Mar 5 2024, 9:49 PM

There might be something to be said for putting libsys_sigwait in its own file. Alternatively we could also kill off sigwait and make it static instead.

Ok, but why moving the code into the interposer's file? I would see adding e.g. libc_sigwait.c source with the EINTR loop function. Or keeping the function in its current place.

Add a libsys_sigwait that implements __libsys_sigwait. I think we
might be able to move it back to libc and the libc interposer table,
but without further testing I'm worried about breaking things during
upgrades so I think this split makes sense for now.

lib/libsys/interposing_table.c
32

This addition is not needed.

35

Why not keep the prototype in libc_private.h?

lib/libsys/libsys_sigwait.c
30

Headers are already ordered alphabetically.

kib added inline comments.
lib/libc/include/libc_private.h
418

No need to use __restrict, libc is always compiled by mode where restrict is valid.

This revision is now accepted and ready to land.Mar 12 2024, 11:59 PM
This revision was automatically updated to reflect the committed changes.