NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60288: callout(9) does not document callout_schedule()



The following reply was made to PR kern/60288; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: NetBSD bugtracking <gnats-bugs%netbsd.org@localhost>
Cc: 
Subject: Re: kern/60288: callout(9) does not document callout_schedule()
Date: Sun, 24 May 2026 01:03:03 +0300

 > but callout_schedule is only referenced in the descripton of
 > callout_setfunc(), to wit:
 > 
 >      The callout_setfunc() function sets the function and argument of the
 >      callout handle c to func and arg respectively.  The callout handle must
 >      already be initialized.  If a callout will always be used with the same
 >      function and argument, then callout_setfunc() used in conjunction with
 >      callout_schedule() is slightly more efficient than using callout_reset().
 > 
 > I'd like to see a paragraph about callout_schedule itself.
 
 Isn't that _literally_ the paragraph about it?  There's a single
 function "reset" that sets both the function and the ticks, and
 there's a pair of functions "setfunc" and "schedule" that set them
 separately.  Speaking from experience (i.e. I did use this API) - it
 doesn't make much sense to document them separately.  The wording of
 the paragraph can be improved, but I'm quite opposed to the idea of
 artificially separating them.
 
 
 -uwe
 



Home | Main Index | Thread Index | Old Index