RE: help regarding software interrupts

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

 




hi 
as i have already mentioned in a mail the scenario where i would need to 
asynchronously notify from kernel to user, i have taken a stand of sending 
a signal SIGIO to one process and any unsed signal to the other process.
Can anyone tell me if it is possible to send any signals through 
kill_fasync. most drivers in linux source code which i have come across 
used only SIGIO for this kind of notification..i am not very much sure if 
signals like SIGUSR1 or SIGUSR2 can also be used ? I am sure SIGUSR1 or 
SIGUSR2 are not used anywhere.
can anyone plz clear this doubt ??
thanks in advance

Regards,
Vijay Ram.C



On Fri, 15 Jul 2005, Aggarwal, Vikas (OFT) wrote:

> I am porting a driver (2.6.x ) kernel.  It uses "send_sig" to notify
> user process. The "send_sig"  is called from the tasklet.
> http://lxr.linux.no/source/kernel/signal.c#L1249
> 
> Don't know if this the best or only way.
> 
> Thanks
> -vikas
> 
> 
> --------------------------------------------------------
> This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system.
> 
> 
> -----Original Message-----
> 
> From: kernelnewbies-bounce@xxxxxxxxxxxx
> [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Vijay Ram
> Chitrapu (RCVIJAYD)
> Sent: Friday, July 15, 2005 3:43 AM
> To: Thomas Petazzoni
> Cc: Vijay Ram Chitrapu (RCVIJAYD); kernelnewbies@xxxxxxxxxxxx
> Subject: Re: help regarding software interrupts
> 
> 
> 
> Hi Robert 
> 
> Thanks for the info..
> i was under an idea that software interrupts can be used to send 
> some kind of signals to the user space asynchronously. Is it possible 
> for a driver running in the kernel to generate a software interrupt 
> asynchronously to the user such that the user is informed of some change
> 
> in the kernel the driver is involved with? I am well aware of the fasync
> 
> method of asynchronous notification..but want to know if this way of 
> signalling is feasible or not?
> 
> Regards,
> Vijay Ram.C
> 
> 
> On Fri, 15 Jul 2005, Thomas Petazzoni wrote:
> 
> > Hello,
> > 
> > Vijay Ram Chitrapu (RCVIJAYD) wrote:
> > 
> > > Can anyone help me understand what Software Interrupts are? 
> > >  Any links or examples  are welcomed..
> > 
> > Basically, on x86 architecture, you can have three sources of
> interruption :
> > 
> >   - the processor himself, that generates "exceptions", such as Page 
> > Fault, General Protection Fault, Divide by Zero and so on. On IA32 
> > architecture, there are 32 exceptions ;
> > 
> >   - the hardware, such as network cards, sound cards, hard drives and 
> > much more generates IRQs to signal an event (arrival of a network 
> > packet, acknowledgment of a DMA transfer, etc.) ;
> > 
> >   - the software which, using the <int> instruction, explicitly 
> > generates a so-called <software interrupt>.
> > 
> > So, the software interrupts are interrupts that are generated
> explicitly 
> > by the code running on the processor. The typical usage of such 
> > interrupts is to implement syscalls : when the code is running in user
> 
> > (non privileged) mode, it cannot call kernel code directly. In order
> to 
> > switch to kernel (privileged) mode, a software interrupt is used (at 
> > least on x86).
> > 
> > Don't hesitate to ask for more details. Others, don't hesitate to 
> > correct me if I'm wrong.
> > 
> > Sincerly,
> > 
> > Thomas
> > 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 


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