[PATCH] [libcxx] Windows port of thread/mutex/chrono

G M gmisocpp at gmail.com
Wed Oct 16 13:54:15 PDT 2013


Hi Nico

Sorry, forgot to mention a few other possible changes other than the chrono
one:

In atomic_fetch_sub_seq4 below , InterlockedExchangeSubtract better here?

_LIBCPP_INLINE_VISIBILITY
static unsigned atomic_fetch_sub_seq4(_Atomic(unsigned)* obj, unsigned arg)
{
#ifdef __clang__
    return __c11_atomic_fetch_sub(obj, arg, std::memory_order_seq_cst);
#else
    return static_cast<unsigned>(_InterlockedExchangeAdd((volatile
long*)obj, -arg));
#endif
}

In futex.cpp:
                atomic_fetch_add_seq4(&m->__waiters, -__futex_lock_incr);
atomic_fetch_sub_seq4(&m->__waiters, __futex_lock_incr) a better fit?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131017/e16b88a1/attachment.html>


More information about the cfe-commits mailing list