Add back the peek methods to ABA. (#165)

These are used by the Verona runtime.
This commit is contained in:
Paul Liétar
2020-04-09 15:13:57 +02:00
committed by GitHub
parent 74657d9dbc
commit 89523a96bd

View File

@@ -114,6 +114,12 @@ namespace snmalloc
Cmp(const Cmp&) = delete;
};
// This method is used in Verona
T* peek()
{
return independent.ptr.load(std::memory_order_relaxed);
}
};
#else
/**
@@ -166,6 +172,12 @@ namespace snmalloc
# endif
}
};
// This method is used in Verona
T* peek()
{
return ptr.load(std::memory_order_relaxed);
}
};
#endif
} // namespace snmalloc