Skip to content
Snippets Groups Projects
Commit bbcd59f7 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

Make lock-free mutex our default mutex

This patch turns on the flag which switches all our code to use the
lock-free mutex instead of the spinlock-based mutex.

It's time we start using the lock-free mutex, which is stable enough by
now - but please let me know if you do experience any performance problem,
or bugs, related to the new mutex.

If you need to disable the new mutex temporarily and return to the old,
just change the "#define LOCKFREE_MUTEX" in osv/mutex.h to #undef.
parent 8031eeae
No related branches found
No related tags found
No related merge requests found
......@@ -5,9 +5,9 @@
#include <string.h>
#include <stdint.h>
// To replace the spin-lock-based mutex with lockfree::mutex everywhere,
// change #undef LOCKFREE_MUTEX here to #define.
#undef LOCKFREE_MUTEX
// To use the spin-lock-based mutex instead of lockfree::mutex everywhere,
// change #define LOCKFREE_MUTEX here to #undef.
#define LOCKFREE_MUTEX
#ifdef LOCKFREE_MUTEX
#define LOCKFREE_MUTEX_SIZE 40
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment