Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kqueue: SIGIO?
On Wed, Sep 30, 2015 at 11:28:35PM +0700, Robert Elz wrote:
> It also fits with the only safe thing that's really possible to do in a
> single handler being to set a variable and return (or exit the process)
> (ie: the main loop has to check a variable anyway, whether signal delivery
> is traditional, or via Mouse's suggested mechanism).
>
> The issue with it is how one would ever safely clear the variable again,
> while avoiding race conditions -
An atomic read-modify-write cycle; other than vintage cpus have these
in hardware.
Anyhow, infiniband had to come up with some scheme for this; borrowing
that rather than reinventing it (or not borrowing it if it sucks,
instead of reinventing it by accident) seems like a good starting
point.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index