linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddededge.com>
To: Jaap-Jan Boor <jjboor@aimsys.nl>
Cc: Juergen Oberhofer <e9826367@student.tuwien.ac.at>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: mpc / linux kernel - user space
Date: Fri, 28 Nov 2003 10:42:34 -0500	[thread overview]
Message-ID: <3FC76CEA.9040309@embeddededge.com> (raw)
In-Reply-To: 1070011018.1263.27.camel@linpc003.aimsys.nl


Jaap-Jan Boor wrote:

> If you want to send a signal to user code, you can use kill_proc()
> I think.

IMHO, trying to use signals to propagate a hardware interrupt to a
user application is complicated and has design flaws (what happens
if the application "misses" an interrupt or gets blocked for some
reason).

A couple of other methods that I find simple and use extensively
are multi-threading the application and then using a different
minor ID device to wait on a read() or ioctl() to simply return.
The driver just uses the standard sleep/wakeup mechanisms to
synchronize with the application.

Another, and I think most useful, method is to implement a select/poll
entry point in the driver.  It provides the most flexibility when
waiting for various events, plus provides a timeout should something
fail to function properly.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-11-28 15:42 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     ` mpc / linux kernel - user space Jaap-Jan Boor
2003-11-28 15:42       ` Dan Malek [this message]
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=3FC76CEA.9040309@embeddededge.com \
    --to=dan@embeddededge.com \
    --cc=e9826367@student.tuwien.ac.at \
    --cc=jjboor@aimsys.nl \
    --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 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).