summaryrefslogtreecommitdiff
path: root/debian/patches/try-fence0001-try-fence.patch
blob: 017bba841514221267bd0dfe9bbedc897bf07007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 83dad8de034370f216ca8123345d806ffb48c1fb Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Mon, 7 Sep 2015 13:04:39 +0200
Subject: [PATCH gnumach 1/2] try fence

---
 kern/mach_clock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index 655adf4..aab7010 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -99,8 +99,10 @@ MACRO_BEGIN							\
 	if (mtime != 0) {					\
 		mtime->check_seconds = (time)->seconds;		\
 		asm volatile("":::"memory");			\
+		__sync_synchronize();				\
 		mtime->microseconds = (time)->microseconds;	\
 		asm volatile("":::"memory");			\
+		__sync_synchronize();				\
 		mtime->seconds = (time)->seconds;		\
 	}							\
 MACRO_END
-- 
2.1.4