All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] Generic light-weight syscall.
@ 2003-07-25  6:37 Carlos O'Donell
  2003-07-25 11:37 ` Matthew Wilcox
  0 siblings, 1 reply; 20+ messages in thread
From: Carlos O'Donell @ 2003-07-25  6:37 UTC (permalink / raw)
  To: parisc-linux

pa,

Any thoughts about how one should implement some type of lightweight
syscall for our glibc to use?

We already have the makings of a simple system for SET_THREAD_SELF (e.g.
seting cr27, the thread register, from userpsace), and I want to extend
this to:

exchange_and_add (volatile uint32_t *mem, int val)
atomic_add (volatile uint32_t *mem, int val)
compare_and_swap (volatile long int *p, long int oldval, long int newval)

o---> libc 
 --> exchange_and_add 
  ==> Params into kernel
   ==> disable interrupts on the current processor
    ==> take a semaphore to keep other cpu's out
    ==> do work 
    ==> release semaphore
   ==> reenable i-bit
  --> back into userspace and done.

This _must_ be very very fast, and appear atomic to userspace.

Perhaps adding other pages instead of 0xE0 for set_thread_self might be
the simplest way to do this? The area after the linux gateway page
perhaps? Which seems to be the start of the next 4k page? Would this be
possible? e.g. branch to 0x1000 (not 0x100 which is the current syscall
branch).

c.

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

end of thread, other threads:[~2003-07-30 16:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-25  6:37 [parisc-linux] Generic light-weight syscall Carlos O'Donell
2003-07-25 11:37 ` Matthew Wilcox
2003-07-26 17:48   ` Carlos O'Donell
2003-07-26 18:00     ` Carlos O'Donell
2003-07-27 12:27       ` Grant Grundler
2003-07-28 15:57         ` Carlos O'Donell
2003-07-28 17:45           ` Matthew Wilcox
2003-07-28 19:04             ` Carlos O'Donell
2003-07-28 19:14               ` Matthew Wilcox
2003-07-28 21:10                 ` Richard Hirst
2003-07-29 17:50                   ` Carlos O'Donell
2003-07-29 18:55                     ` Grant Grundler
2003-07-29 21:06                     ` Richard Hirst
2003-07-29 23:36                       ` Carlos O'Donell
2003-07-30 16:37                         ` Thibaut VARENE
2003-07-29 23:38                       ` Carlos O'Donell
2003-07-29 18:51             ` Grant Grundler
2003-07-27 20:43       ` Michael S.Zick
2003-07-28 20:30   ` Randolph Chung
2003-07-28 20:37     ` Matthew Wilcox

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.