DragonFly commits List (threaded) for 2007-01
DragonFly BSD
DragonFly commits List (threaded) for 2007-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/kern kern_sig.c kern_synch.c src/sys/machine/pc32/i386 machdep.c src/sys/machine/vkernel/i386 cpu_regs.c fork_tramp.s trap.c src/sys/machine/vkernel/include globaldata.h md_var.h src/sys/machine/vkernel/platform systimer.c ...


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Jan 2007 11:26:18 -0800 (PST)

:A second mailboxed signal with a different number. Eg: you make a
:syscall, the syscall returns EINTR and you go to check what's on
:the mailbox, but before being able to read what's on the mailbox
:an other signal gets delivered, so when you actually want to
:look at the mailbox you would be reading the second signal instead
:of the first one.

    Each signal can specify a different mailbox.  If you specify a single
    mailbox for multiple signals they simply overwrite each other... but
    in that case the user software is expected to simply check for a non-zero
    value and poll both.

    I considered making the mailbox a bitmap but it's very expensive to do
    an atomic read-modify-write (and userland would have to do an atomic
    read-modify-clear), and also expensive for userland to have to test
    multiple memory words instead of just a single 'int'.

    I don't think its important to try to distinguish them when the mailbox
    is shared, simply because using a mailbox in the first place implies
    a (mostly) polled environment, and there are really only a few signals
    for which this sort of situation applies.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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