linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Interrupt disabling design
@ 2005-04-07 10:23 Garcia Jérémie
  2005-04-07 10:19 ` Pantelis Antoniou
  2005-04-07 23:58 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 3+ messages in thread
From: Garcia Jérémie @ 2005-04-07 10:23 UTC (permalink / raw)
  To: linuxppc-dev

Hi everybody,=20
I'm trying to emulate a VxWorks-designed application under a linux =
montavista environment.
In this application I have critical portion of code which need the =
interrupts disabled as below:

-------------------------------------
  lockKey =3D OSIntrLock();some=20
    .
    . // my critical code =20
    .
  bsos1IntrUnlock(lockKey);
-------------------------------------
As you can see we use an OS encapsulation layer which is used to call =
the OS routines:

----------------------------
int OSIntrLock(void)
{
  return (intLock());  // vxWorks routine
}

void OSIntrUnlock(int lockKey)
{
  intUnlock(lockKey);  // vxWorks routine
}
----------------------------

Furthermore, I'm running my "VxWorks emulator" in the user-space and I'm =
not allowed to modify files others than the OS encapsulation layer ones.
So, how can I use the "cli() / sti()" functions from the user space as =
below:


 | USER-SPACE   |  --> | KERNEL-SPACE |  --> |    USER-SPACE    | --> | =
KERNEL-SPACE |  --> | USER-SPACE |
 |              |      |              |      |                  |     |  =
            |      |            |        =20
 | OSIntrLock() |      |   cli()      |      | my critical code |     |  =
  sti()     |      |   .....    |
                                             |  OSIntrUnlock()  |   =20

Is it possible to do that? Cause If I do a "cli()" call, I disable =
interrupts --> so, will the "sti()" call work?
If yes, it allows me to make my own system call to use them from the =
user space but I'm not really sure...

Tks a lot for your help=20

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-07 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-07 10:23 Interrupt disabling design Garcia Jérémie
2005-04-07 10:19 ` Pantelis Antoniou
2005-04-07 23:58 ` Benjamin Herrenschmidt

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).