Page MenuHomeFreeBSD

sched_4bsd: update function name in comment
ClosedPublic

Authored by mchoo on Sep 4 2026, 5:36 PM.
Tags
None
Referenced Files
F174717875: D59397.id185833.diff
Mon, Oct 5, 11:15 AM
F174715802: D59397.id185874.diff
Mon, Oct 5, 10:50 AM
F174660706: D59397.id187098.diff
Mon, Oct 5, 12:59 AM
F174606655: D59397.id185874.diff
Sun, Oct 4, 3:22 PM
Unknown Object (File)
Sat, Oct 3, 7:22 PM
Unknown Object (File)
Wed, Sep 30, 3:48 PM
Unknown Object (File)
Sun, Sep 27, 4:40 AM
Unknown Object (File)
Sun, Sep 27, 3:17 AM
Subscribers

Details

Summary

In b43179fbe815 ("Create a new scheduler api..."), schedclock() was
renamed to sched_clock() but the function name in the comment remained
still. Update the comment to reflect up-to-date name for schedclock().

Fixes: b43179fbe815 ("Create a new scheduler api...")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 76540
Build 73423: arc lint + arc unit

Event Timeline

mchoo requested review of this revision.Sep 4 2026, 5:36 PM

Mmm... Certainly, schedclock() should have been updated to sched_clock() in commit b43179fbe815 ("Create a new scheduler api..."), which renamed the function. But then, it is still technically true even today that sched_clock() actually updates the mentioned fields, it's just that it does so indirectly (through sched_clock_tick(), of which sched_clock() is the only caller). Keeping the mention of the upper-level function / entry point to the scheduler could be seen as clearer. The recently-introduced possibility to have multiple schedulers compiled in the same kernel lead to some ugly renames, and that's why sched_clock() was renamed to sched_4bsd_clock(). Conceptually, though, the interface function triggering the updates is still sched_clock() (it's how it is referenced from outside 4BSD). I'd slightly prefer having sched_clock() in the comment.

This revision is now accepted and ready to land.Sep 5 2026, 1:35 PM
This revision was automatically updated to reflect the committed changes.