aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index f0b2f4a71c..c05143bece 100644
--- a/src/util.h
+++ b/src/util.h
@@ -726,4 +726,10 @@ inline bool AffinityBugWorkaround(void(*pfn)(void*))
return false;
}
+inline uint32_t ByteReverse(uint32_t value)
+{
+ value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
+ return (value<<16) | (value>>16);
+}
+
#endif