Re: priorities to signal

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

 



Hi,
This is my understanding of how signals work..

 Signals have no relative priorities. They are stored in sigset_t
However, in terms of implementation, they are delivered in a fixed
order to the process.
The function to look at is do_signal which calls dequeue signal to get
the next signal to process. If there are no more signals, it quits.
The list of signals are kept in 2 32-bit words (on x86). This is set
as _NSIG_WORDS.
dequeue_signal calls next_signal which iterates over the 2 words, and gets the
next signal pending, filters it through the signal mask and if it
passes the mask, it is returned to dequeue_signal and is processed.
Signals that are masked out are not processed.

The iteration is done in a fixed order. You can look at signal.h under
include/asm-*.
So, the implementation forces a default priority if more than 1 signal
is pending.
All this is in 2.4.20..

Hopefully I got all this right.
vijay


On 08/01/06, Deepak Joshi <deepak_cins@xxxxxxxxxxx> wrote:
> Hi all,
>
> Is there any priorities assigned to signals if more
> than two signals are delivered to a process at the
> same time ? how kernel handles it and what happens in
> case of SMP based systems. i read about signals but
> not able to get any info related to priority of
> signals.
>
> plz explain how it is implemented in kernel ?
>
> Thanks and Regards,
> Deepak Joshi.
>
>
>
> ___________________________________________________________
> Yahoo! Exclusive Xmas Game, help Santa with his celebrity party - http://santas-christmas-party.yahoo.net/
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>


--
Networks Lab, RPI
http://poisson.ecse.rpi.edu/~vijay

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux