Page MenuHomeFreeBSD

Add a callout_func_t typedef for functions used with callout_*().
ClosedPublic

Authored by jhb on Dec 10 2019, 7:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 11:51 PM
Unknown Object (File)
Sat, Nov 2, 11:16 AM
Unknown Object (File)
Oct 14 2024, 11:15 AM
Unknown Object (File)
Oct 13 2024, 12:19 AM
Unknown Object (File)
Sep 29 2024, 10:10 PM
Unknown Object (File)
Sep 17 2024, 9:27 AM
Unknown Object (File)
Sep 16 2024, 4:09 PM
Unknown Object (File)
Sep 16 2024, 1:02 PM
Subscribers

Details

Summary

This typedef is the same a timeout_t except that it is in the callout
namespace and header.

Use this typedef in various places of the callout implementation that
were either using the raw type or timeout_t.

While here, add <sys/callout.h> to the manpage.

Test Plan
  • booted an amd64 VM in bhyve

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

.Dd bump is the only thing I see...

This revision is now accepted and ready to land.Dec 10 2019, 7:16 PM
kib added inline comments.
sys/kern/kern_timeout.c
148 ↗(On Diff #65463)

The drain function is somewhat strange to convert to the same typedef as callout, but ok.

771 ↗(On Diff #65463)

Fix style while there, move local declaration to the start of the function ?

bcr added a subscriber: bcr.

My own callout is this: approved! ;-)

jhb marked an inline comment as done.Dec 10 2019, 9:30 PM
jhb added inline comments.
sys/kern/kern_timeout.c
148 ↗(On Diff #65463)

While I agree it is strange, the drain function pointer is saved in c_func by callout_drain_async(), and the manpage before my change used timeout_t for the drain function argument to callout_drain_async(). Given those, it seemed reasonable to me to use the typedef for the drain function pointers.