From: Jaap-Jan Boor <jjboor@aimsys.nl>
To: Juergen Oberhofer <e9826367@student.tuwien.ac.at>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: mpc / linux kernel - user space
Date: Fri, 28 Nov 2003 10:16:59 +0100 [thread overview]
Message-ID: <1070011018.1263.27.camel@linpc003.aimsys.nl> (raw)
In-Reply-To: <Pine.GHP.4.58.0311271903490.4360@stud3.tuwien.ac.at>
Hi Juergen,
What I more ment with 'signal your application process' is you have
a user thread block waiting in the read() system call of your driver
and your driver will wake up that blocking read, so the application
thread returns from read.
If you want to send a signal to user code, you can use kill_proc()
I think.
Jaap-Jan
On Thu, 2003-11-27 at 19:08, Juergen Oberhofer wrote:
> Thank you! You mean that the application should install a signal handler
> and
> the module sends on every interrupt a signal to the application process.
> Do you know, Which function does exist to send a signal? I guess, the
> module has to know the pid of the application process? How can the module
> be informed about it?
> Regards,
> Juergen
>
> On Thu, 27 Nov 2003, Jaap-Jan Boor wrote:
>
> > Hi Juergen,
> >
> > That's normally not something you do and I don't know if it's possible.
> > Application code normally communicates with your driver code using
> > system
> > calls (read/write). So either your appl procedure must be part
> > of your module, or you must signal e.g. a user thread the timer
> > interrupt happened, so the thread can execute that code.
> > Hope this helps,
> >
> > Jaap-Jan
> >
> >
> > On 27-nov-03, at 17:07, Juergen Oberhofer wrote:
> >
> > >
> > > Hi,
> > >
> > > I have a module and an application program in user space:
> > >
> > > The Module performs the following task: at init it initializes the cpm
> > > timer register of the mpc823,
> > > such that an interrupt is generated every x microseconds. Thus, I
> > > installed an interrupt handling function f that handles the timer
> > > interrupts.
> > >
> > > My problem is that the module / the interrupt handling function should
> > > execute a procedure defined in the application program. How can I pass
> > > a
> > > pointer (which points to that function) from the appl.program to the
> > > module, such that the handler can execute this function every x
> > > milliseconds? I thought to create a procedure in the module that
> > > accepts
> > > a function pointer as argument. But how can I achieve, that this module
> > > procedure is visible to the application program? Does somebody have a
> > > suggestion or know another way to do it?
> > >
> > > Regards,
> > > Juergen
> > >
> > >
> >
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-11-28 9:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-27 16:07 mpc / linux kernel - user space Juergen Oberhofer
2003-11-27 17:38 ` Jaap-Jan Boor
2003-11-27 18:08 ` Juergen Oberhofer
2003-11-27 19:28 ` Dan Kegel
2003-11-28 4:30 ` How to change /proc to the writable directory John Zhou
2003-11-28 8:12 ` Wolfgang Denk
2003-11-28 9:16 ` Jaap-Jan Boor [this message]
2003-11-28 15:42 ` mpc / linux kernel - user space Dan Malek
2003-12-01 8:18 ` Jaap-Jan Boor
2003-12-01 12:51 ` Peripherals Memory Mapping Kevin A. Sapp
2003-12-14 15:28 ` Paul Miller
2003-12-01 13:47 ` mpc / linux kernel - user space Juergen Oberhofer
2003-11-28 5:34 ` Sampath Kumar
2003-11-28 8:14 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1070011018.1263.27.camel@linpc003.aimsys.nl \
--to=jjboor@aimsys.nl \
--cc=e9826367@student.tuwien.ac.at \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.