From 1ea3f90f4e80e68ff12ab2ec81e733706266f980 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Thu, 30 Jun 2016 20:59:52 +0200 Subject: [PATCH] More safety for spinlock --- kernel/include/spinlock.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/include/spinlock.hpp b/kernel/include/spinlock.hpp index 102d351a..b8f3b24a 100644 --- a/kernel/include/spinlock.hpp +++ b/kernel/include/spinlock.hpp @@ -15,6 +15,7 @@ private: public: void acquire(){ while(!__sync_bool_compare_and_swap(&lock, 0, 1)); + __sync_synchronize(); } void release(){