From: Wolfgang Denk <wd@denx.de>
To: "Garcia Jérémie" <GARCIAJ@3il.fr>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: How to register a user-space function as an interrupt handler ?
Date: Thu, 26 May 2005 14:35:58 +0200 [thread overview]
Message-ID: <20050526123603.2421EC1512@atlas.denx.de> (raw)
In-Reply-To: Your message of "Thu, 26 May 2005 12:09:51 +0200." <D4FDDD1349B5AC46B68FC26AD8AF42D6226B2C@exnet.3il.fr>
Hello,
in message <D4FDDD1349B5AC46B68FC26AD8AF42D6226B2C@exnet.3il.fr> you wrote:
> Hi everybody, I'm tryin to adapt a vxWorks-designed application to a
...
> What I would like to do is to make an emulation of both vxWorks routines
> (intConnect() and intEnable()) in the linux world
> cause I'm not allowed to change that code.
This makes no sense. You cannot "port" such code from VxWorks to
Linux without making any changes.
As for your question: in Linux interrupt hadling happens in kernel
context only. You cannot register user space functions as interrupt
handlers.
> Furthermore, I'm a newbie in linux developpment and if I understand
> well, I need to be in kernel-space to call those routines.
Right.
> But here is my problem: the interrupt handler that we call is part of
> the application and uses a lot of #define,semaphores and other
> ressources of the user-application. So can I implement a new linux
> system call, that will register our user-space-function (my_handler())
This cannot and should not be done. You will have to go through your
software design and adapt it for the new operating system
environment. Unix has somewhat different concepts how some things get
done, and instead of fighting with this envrionment you should adapt
to it.
> Don't forget that I have to respect two conditions: my application must
> be run from user-space and I cannot modify the
> code (my team does not want to support versions).
Simple answer: The job cannot be done under such constraints.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"It is better to have tried and failed than to have failed to try,
but the result's the same." - Mike Dennison
prev parent reply other threads:[~2005-05-26 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 10:09 How to register a user-space function as an interrupt handler ? Garcia Jérémie
2005-05-26 12:35 ` Wolfgang Denk [this message]
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=20050526123603.2421EC1512@atlas.denx.de \
--to=wd@denx.de \
--cc=GARCIAJ@3il.fr \
--cc=linuxppc-dev@ozlabs.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