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)
Sat, Dec 7, 8:39 PM
Unknown Object (File)
Fri, Nov 29, 3:12 AM
Unknown Object (File)
Nov 22 2024, 5:54 PM
Unknown Object (File)
Nov 20 2024, 3:24 PM
Unknown Object (File)
Nov 20 2024, 1:36 PM
Unknown Object (File)
Nov 17 2024, 11:51 PM
Unknown Object (File)
Nov 2 2024, 11:16 AM
Unknown Object (File)
Oct 14 2024, 11:15 AM
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.