Page MenuHomeFreeBSD

callout: provide callout_init_lock()
ClosedPublic

Authored by glebius on Sat, Sep 5, 5:50 PM.
Tags
None
Referenced Files
F172914490: D59456.diff
Tue, Sep 22, 1:41 AM
F172838423: D59456.id187148.diff
Mon, Sep 21, 11:16 AM
Unknown Object (File)
Mon, Sep 21, 1:33 AM
Unknown Object (File)
Mon, Sep 21, 1:33 AM
Unknown Object (File)
Sun, Sep 20, 10:46 PM
Unknown Object (File)
Sun, Sep 20, 8:04 PM
Unknown Object (File)
Sat, Sep 19, 1:35 PM
Unknown Object (File)
Fri, Sep 18, 5:45 PM
Subscribers

Details

Summary

This is type agnostic locked callout initializer. The callout_init_mtx()
and etc remain for compatibility.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76579
Build 73462: arc lint + arc unit

Event Timeline

  • Use _Generic() instead of transparent union
  • Reduce amount of changes.

Remove mention of lock_object_t in the manual page.

kib added inline comments.
share/man/man9/callout.9
216
This revision is now accepted and ready to land.Sun, Sep 6, 9:24 PM
markj added inline comments.
share/man/man9/callout.9
198–199
247
267–268
sys/sys/callout.h
91

As in D59457, I think it'd be better to provide a helper macro in some central place, so that other consumers do not need to duplicate the selector which extracts the lock_object pointer.

Here, such a macro does not eliminate much code, but it'd still be a bit cleaner IMHO.

  • Manual page fixes.
  • Use lk2lo().
This revision now requires review to proceed.Mon, Sep 7, 5:38 PM
This revision is now accepted and ready to land.Mon, Sep 7, 7:09 PM
This revision was automatically updated to reflect the committed changes.