Skip to content

Commit

Permalink
Bug 1155864 - Rip out Windows intrinsics from Atomics.h and allow Ato…
Browse files Browse the repository at this point in the history
…mic to hold 64-bit types everywhere. r=Waldo
  • Loading branch information
sethfowler committed Apr 18, 2015
1 parent ebd83c9 commit 36709ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mfbt/Atomics.h
Expand Up @@ -511,10 +511,8 @@ namespace detail {
template<typename T, MemoryOrdering Order>
class AtomicBase
{
// We only support 32-bit types on 32-bit Windows, which constrains our
// implementation elsewhere. But we support pointer-sized types everywhere.
static_assert(sizeof(T) == 4 || (sizeof(uintptr_t) == 8 && sizeof(T) == 8),
"mozilla/Atomics.h only supports 32-bit and pointer-sized types");
static_assert(sizeof(T) == 4 || sizeof(T) == 8,
"mozilla/Atomics.h only supports 32-bit and 64-bit types");

protected:
typedef typename detail::AtomicIntrinsics<T, Order> Intrinsics;
Expand Down
2 changes: 2 additions & 0 deletions mfbt/tests/TestAtomics.cpp
Expand Up @@ -239,6 +239,8 @@ main()
{
TestType<uint32_t>();
TestType<int32_t>();
TestType<uint64_t>();
TestType<int64_t>();
TestType<intptr_t>();
TestType<uintptr_t>();
TestPointer<int>();
Expand Down

0 comments on commit 36709ff

Please sign in to comment.