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

Matthew Dillon dillon at
Sun Jan 14 11:31:43 PST 2007

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

					Matthew Dillon 
					<dillon at>

More information about the Commits mailing list