Add prefetch to mpscq.
This commit is contained in:
@@ -136,6 +136,15 @@ namespace snmalloc
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void prefetch(void* ptr)
|
||||
{
|
||||
#if defined(PLATFORM_IS_X86)
|
||||
_mm_prefetch(reinterpret_cast<const char *>(ptr), _MM_HINT_T0);
|
||||
#else
|
||||
# warning "Missing pause intrinsic"
|
||||
#endif
|
||||
}
|
||||
|
||||
inline uint64_t tick()
|
||||
{
|
||||
#if defined(PLATFORM_IS_X86)
|
||||
|
||||
Reference in New Issue
Block a user