aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
blob: 6409dbfcf9ede833ec5f173dfe188f5757455a56 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 8080b9ae7f4d673a32b1df892bf3dddb9dff2789 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
Subject: [PATCH 04/31] nativesdk-glibc: Allow 64 bit atomics for x86

The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
It also makes the synchronization more efficient.

Upstream-Status: Inappropriate [OE-Specific]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 sysdeps/x86/atomic-machine.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
index b06de58190..ebe572fa80 100644
--- a/sysdeps/x86/atomic-machine.h
+++ b/sysdeps/x86/atomic-machine.h
@@ -58,15 +58,14 @@ typedef uintmax_t uatomic_max_t;
 #endif
 
 #define USE_ATOMIC_COMPILER_BUILTINS	1
+# define __HAVE_64B_ATOMICS		1
 
 #ifdef __x86_64__
-# define __HAVE_64B_ATOMICS		1
 # define SP_REG				"rsp"
 # define SEG_REG			"fs"
 # define BR_CONSTRAINT			"q"
 # define IBR_CONSTRAINT			"iq"
 #else
-# define __HAVE_64B_ATOMICS		0
 # define SP_REG				"esp"
 # define SEG_REG			"gs"
 # define BR_CONSTRAINT			"r"
-- 
2.20.1