atomic operations under linux

atomic operations under linux

Raz raziebe at gmail.com
Thu Dec 10 11:12:19 IST 2009


On Thu, Dec 10, 2009 at 10:33 AM, Gilboa Davara <gilboad at gmail.com> wrote:

> On Thu, 2009-12-10 at 08:58 +0200, Shachar Shemesh wrote:
> > Gilboa Davara wrote:
> > > On Wed, 2009-12-09 at 20:04 +0200, Raz wrote:
> > >
> > > > Do not use inline kernel atomic_t operation, you will violate GPL.
> > > > Use gcc builtins. If you want information please refer to:
> > > >
> http://sos-linux.svn.sourceforge.net/viewvc/sos-linux/offsched/Linux-Debug/
> > > > and download linux-debug.pdf . You will few words on atomicity in
> user
> > > > space in linux.
> > > > Please execuse for bad editing, the paper is not complete.
> > > >
> > > > raz
> > > >
> > >
> > > Thanks.
> > > While I was aware of the derived problem - I neglected to point it out.
> > > Thanks.
> > >
> > > At least in my case (and partially due to the derived work problem), I
> > > simply wrote my own set of assembly functions that worked the same
> under
> > > both Linux/BSD and Windows (under both user mode and kernel mode).
> > >
> > > - Gilboa
> > >
> > I might be missing something really basic, but may I ask "why"? What
> > would you want to achieve that would require you to use the "get and
> > set" (or "test and set", or whatever) in user space?
> >
> > Shachar
>
> Why?
> - Write code that can run more-or-less the same as kernel module and as
> a user-space library. (And under multiple different OS')
> - Implement fast spinlocks and/or RW locks in user mode. (Again, that
> behave the same under kernel mode and user mode.)
>
Giloboa
why not take a look at urcu for fast locks.http://www.lttng.org/?q=node/18
I talked to the guy i saw the presentation at the LPC.

> - Atomic counters.
> - Anything else that can use the "lock" prefix.
>
> - Gilboa
>
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20091210/0140cf01/attachment.html>


More information about the Linux-il mailing list