* How ?
@ 2003-05-15 5:07 Rakesh Jagota
2003-05-15 13:31 ` Bret Indrelee
0 siblings, 1 reply; 4+ messages in thread
From: Rakesh Jagota @ 2003-05-15 5:07 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
Can anyone suggest me how we can invoke the interrupt generated in the
kernel from the user application. I am getting the interrupt in the driver, I
want to update some register in the application, when the inettrupt will be
generated, Right now I am using polloing method. Continuously I am calling
read routines.
Thanks in advance,
Rakesh Jagota
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How ?
2003-05-15 5:07 How ? Rakesh Jagota
@ 2003-05-15 13:31 ` Bret Indrelee
2003-05-15 13:35 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Bret Indrelee @ 2003-05-15 13:31 UTC (permalink / raw)
To: Rakesh Jagota; +Cc: linuxppc-embedded
On Thu, 15 May 2003, Rakesh Jagota wrote:
> Can anyone suggest me how we can invoke the interrupt generated in the
> kernel from the user application. I am getting the interrupt in the driver, I
> want to update some register in the application, when the inettrupt will be
> generated, Right now I am using polloing method. Continuously I am calling
> read routines.
Don't know why you want to handle it from user space, but the easiest way
to notify an application would be to send a signal. Have a special ioctl()
to notify the driver that this application wants a signal, and then when
the driver receives the interrupt it clears the condition and sends a
signal to the registered application(s).
-Bret
--
Bret Indrelee QLogic Corporation
Bret.Indrelee@qlogic.com 6321 Bury Drive, St 13, Eden Prairie, MN 55346
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How ?
2003-05-15 13:31 ` Bret Indrelee
@ 2003-05-15 13:35 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2003-05-15 13:35 UTC (permalink / raw)
To: Bret Indrelee; +Cc: Rakesh Jagota, linuxppc-embedded
In message <Pine.LNX.4.44.0305150828210.26702-100000@spider.ancor.com> you wrote:
>
> Don't know why you want to handle it from user space, but the easiest way
> to notify an application would be to send a signal. Have a special ioctl()
> to notify the driver that this application wants a signal, and then when
> the driver receives the interrupt it clears the condition and sends a
> signal to the registered application(s).
Instead of inventing new special ioctl()'s it's probably better to
use existing and standardized interfaces like select() resp. poll().
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"The POP3 server service depends on the SMTP server service, which
failed to start because of the following error: The operation comple-
ted successfully." -- Windows NT Server v3.51
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: How?
@ 2003-05-15 14:03 Craig Hollabaugh
0 siblings, 0 replies; 4+ messages in thread
From: Craig Hollabaugh @ 2003-05-15 14:03 UTC (permalink / raw)
To: linuxppc-embedded
Rakesh,
Your interrupt routine can send a signal to your user space process.
Here's what I've used
void sendSignal(void)
{
struct task_struct *p;
if ( pid ) {
/*
for_each_task(p) {
if (p->pid == pid) {
send_sig(SIGIO,p,1);
break;
}
}
*/
/* or better yet */
if (p = find_task_by_pid(pid)) send_sig(SIGIO,p,1);
/* from page 83 in ulk */
}
}
ulk is Understanding The Linux Kernel.
Craig
--
___________________________________________________________
Dr. Craig Hollabaugh craig@hollabaugh.com
Author of Embedded Linux
P.O. Box 1405
Ouray, CO 81427-1405 See my "kitchen sink" resume at
970 325 4810 home www.hollabaugh.com/resume.html
970 325 0509 office
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-15 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-15 14:03 How? Craig Hollabaugh
-- strict thread matches above, loose matches on Subject: below --
2003-05-15 5:07 How ? Rakesh Jagota
2003-05-15 13:31 ` Bret Indrelee
2003-05-15 13:35 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).