Re: [linux-audio-dev] userspace atomic primitives for multithread and SMP applications?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] userspace atomic primitives for multithread and SMP applications?
From: Michael Ost (most_AT_museresearch.com)
Date: Wed Sep 10 2003 - 00:23:36 EEST


I found some definitions in boost/detail/atomic_count.hpp, with gcc,
win32, etc. flavors. I still haven't figured out how they are used! But
at least there is source to play with.

- mo

On Mon, 2003-09-08 at 22:13, Jack O'Quin wrote:
> Michael Ost <most_AT_museresearch.com> writes:
>
> > I know this message is ancient, but if you are still looking for atomic
> > primitives I just ran across some in the boost code base. I can't figure
> > out how to use them (!) but perhaps you can? Boost, if you don't know,
> > seems to be kind of a proving ground for the C++ working group. Lots of
> > libraries which are cross platform and written by smart people. See
> > www.boost.org.
> >
> > Hope this helps... mo
> >
> > PS At least the code might provide some hints for how to implement
> > atomic primitives yourself. The code is open, but not GPLd.
>
> Thanks for the pointer, mo.
>
> Where are these primitives actually defined? I found this in
> once.cpp...
>
> // The friendly form of InterlockedCompareExchange that defers
> // according to the above function type wrappers.
> inline LONG compare_exchange(volatile LPLONG dest, LONG exch, LONG cmp)
> {
> return ice_wrapper(&InterlockedCompareExchange, dest, exch, cmp);
> }
>
> But, I can't figure out where the ice_wrapper stuff is defined. I
> suspect it may be the interesting part, some kind of machine-dependent
> layer.
>
> Regards,
> --
> Jack O'Quin
> Austin, Texas, USA


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Sep 10 2003 - 00:43:31 EEST