Re: Signal from kernel space to user space

From: Mark Hounschell
Date: Tue Dec 01 2009 - 10:32:22 EST


Clemens Ladisch wrote:
> Mai Daftedar wrote:
>> Im still new to the kernel development world :)and I was wondering
>> what functions I can use in the kernel space for a signal to be sent
>> to the userspace
>

I have some interest in this. Might I inject a couple of probably stupid related questions?

> kill_pid_(info) is to be preferred over send_sig_info because it ensures
> that the destination process has the same identity (a plain pid number
> might have wrappend around and be in use by another process).
>

Does that mean I can't assume my process pid will unique for the life of the process?

> However, why are you using a signal? What information are you trying to
> send, and why wouldn't eventfd or a plain device thaz becomes readable
> be a better solution?
>

If no "information" is required, which of these are the fastest, say from an interrupt handler?
I have a PCI card that handles external interrupts from the outside world and does nothing but
report those external interrupts to userland. We use send_sig or wake_up_process depending
on whether userland is going to wait for it or not. If there is a better/faster way I would be
very interested.


Thanks and sorry for butting in
Mark

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/