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: Jack O'Quin (joq_AT_io.com)
Date: Tue Sep 09 2003 - 08:13:49 EEST


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 : Tue Sep 09 2003 - 08:21:58 EEST