New "timeout" api, to replace callout

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jan 4 02:40:46 PST 2008


In message <3bbf2fe10801030748u28fe346byd051cecfa55cf636 at mail.gmail.com>, "Atti
lio Rao" writes:
>2008/1/3, Poul-Henning Kamp <phk at phk.freebsd.dk>:

>> What I'm proposing is that your thread will sleep on a plain, but
>> unrelated mutex (internal to the timeout code) until the function
>> comes back.
>>
>> Based on your description above, you won't be able to tell the
>> any difference between this and what you wish for.
>
>This will be hardly feasible.
>Internal callout subsystem locks probabilly need to be spinlocks in
>order to avoid lock mismatches against sleepable locks.

callouts will not be allowed to sleep, they never should have been
able to.

-- 
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