591 {
592#if defined (_STLP_THREADS)
593# if defined (_STLP_ATOMIC_EXCHANGE_PTR)
594 return _STLP_ATOMIC_EXCHANGE_PTR(__p, __q);
595# elif defined (_STLP_ATOMIC_EXCHANGE)
599 );
600# elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
601 _S_swap_lock._M_acquire_lock();
602 void *__result = *__p;
603 *__p = __q;
604 _S_swap_lock._M_release_lock();
605 return __result;
606# else
607# error Missing pointer atomic swap implementation
608# endif
609#else
610
611 void *__result = *__p;
612 *__p = __q;
613 return __result;
614#endif
615 }
#define __REINTERPRET_CAST(__x, __y)
#define _STLP_STATIC_ASSERT(expr)