ReactOS Fundraising Campaign 2012
 
€ 11,198 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static void* _Atomic_swap_struct< 0 >::_S_swap_ptr ( void *_STLP_VOLATILE __p,
void __q 
) [inline, static]

Definition at line 591 of file _threads.h.

                                                                 {
#if defined (_STLP_THREADS)
#  if defined (_STLP_ATOMIC_EXCHANGE_PTR)
  return _STLP_ATOMIC_EXCHANGE_PTR(__p, __q);
#  elif defined (_STLP_ATOMIC_EXCHANGE)
  _STLP_STATIC_ASSERT(sizeof(__stl_atomic_t) == sizeof(void*))
  return __REINTERPRET_CAST(void*, _STLP_ATOMIC_EXCHANGE(__REINTERPRET_CAST(volatile __stl_atomic_t*, __p),
                                                         __REINTERPRET_CAST(__stl_atomic_t, __q))
                            );
#  elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
  _S_swap_lock._M_acquire_lock();
  void *__result = *__p;
  *__p = __q;
  _S_swap_lock._M_release_lock();
  return __result;
#  else
#    error Missing pointer atomic swap implementation
#  endif
#else
  /* no thread */
  void *__result = *__p;
  *__p = __q;
  return __result;
#endif
  }

Generated on Thu Oct 25 2012 06:33:02 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.