[RFC] callout overhaul: part I

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Nov 10 06:12:21 PST 2007


In message <3bbf2fe10711100605h6b12238au7cc9d0fc6d1afde at mail.gmail.com>, "Attil
io Rao" writes:

>> 2.  About XXX_instances
>> -----------------------
>>
>> You propose a XXX_arm() and a XXX_arm_cpu().  That is a pointless
>> limitation.
>>
>> My API proposal said specifically:
>>
>> > The functions above will actually be wrappers for a more generic
>> > set of the same family, which also takes a pointer to a callout-group.
>>
>> And I guess the meaning of this was too subtle, so I will elaborate:
>>
>> The fundamental function will be called
>>
>>         XXX_arm_cg(struct xxx_group *cg, ...)
>>
>> The xxx_group argument can be NULL, in which case a group is
>> chosen for you by unspecified means.
>
>Is this group, in your idea, sorta of a node of the heap you
>previously discussed in the thread?

It is the handle for the handler you want to use, whatever
that is and however it is implemented.

The binary heap will be one member of that struct I pressume,
if the implementation does use a binary heap in the first place.

Our first implementation would likely use the existing callout
mechanism, so that the API conversion can be decoupled from the
implementation of the new and smarter techniques.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list