summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/mheap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/mheap.c')
-rw-r--r--src/vppinfra/mheap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vppinfra/mheap.c b/src/vppinfra/mheap.c
index ba5bbc9b6e7..2769838d4ba 100644
--- a/src/vppinfra/mheap.c
+++ b/src/vppinfra/mheap.c
@@ -41,6 +41,7 @@
#include <vppinfra/mheap.h>
#include <vppinfra/os.h>
#include <vppinfra/time.h>
+#include <vppinfra/lock.h>
#ifdef CLIB_UNIX
#include <vppinfra/elf_clib.h>
@@ -64,7 +65,7 @@ mheap_maybe_lock (void *v)
}
while (clib_atomic_test_and_set (&h->lock))
- ;
+ CLIB_PAUSE ();
h->owner_cpu = my_cpu;
h->recursion_count = 1;