Prev: USB: Added USB_ETH_RNDIS to use instead of CONFIG_USB_ETH_RNDIS
Next: DFU Driver for Atheros bluetooth chipset AR3011
From: Mai Daftedar on 1 Dec 2009 06:10 Hi everyone 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 tryed a number of examples I found after I did some googling that used the API "send_sig_info" however nothing worked :( Any help would be appreciated Can you please CC me in the reply to this mail Thanks Mai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Clemens Ladisch on 1 Dec 2009 08:40 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 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). 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? > I tryed a number of examples I found after I did some googling that > used the API "send_sig_info" however nothing worked :( Because something in that code is wrong. I can't tell you more about the details because my crystal ball is in repair. Best regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mark Hounschell on 1 Dec 2009 10:40 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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Davide Libenzi on 1 Dec 2009 13:20 On Tue, 1 Dec 2009, Mark Hounschell wrote: > 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. eventfd is. eventfd_signal() is also callable from non-sleeping contexts. - Davide -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mai Daftedar on 2 Dec 2009 06:30
Thanks all for the help, I needed to use signals just as interrupt signal from the kernel space so that when a certain change occurs I'd be notified in the userspace I used send_sig _info and it worked :)..The problem was with the signal number I using a wong one.. Thanks > On Tue, Dec 1, 2009 at 8:05 PM, Davide Libenzi <davidel(a)xmailserver.org> wrote: >> >> On Tue, 1 Dec 2009, Mark Hounschell wrote: >> >> > 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. >> >> eventfd is. eventfd_signal() is also callable from non-sleeping contexts. >> >> >> - Davide >> >> > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |