blob: 666c7477c4b605b873ea87e620b70f10e09745fd [file] [log] [blame]
Stewart Smith8b90e5b2016-11-03 13:43:24 +11001From 74d099aaffa37498859c0840771052f50253ce4d Mon Sep 17 00:00:00 2001
2From: Stewart Smith <stewart@linux.vnet.ibm.com>
3Date: Thu, 25 Aug 2016 19:33:42 +1000
4Subject: [PATCH 06/10] Change cv_forcedMemPeriodic to uint8_t as bool is
5 invalid
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10GCC6 throws the following error:
11operand type bool*’ is incompatible with argument 1 of __sync_fetch_and_and
12
13GCC documents that bool is invalid for __sync builtins over at:
14https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins
15" GCC allows any scalar type that is 1, 2, 4 or 8 bytes in size other than the C type _Bool or the C++ type bool"
16
17Change-Id: Iab6415348cb19f590921d8ccc5349867fa57a42d
18Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
19---
20 src/include/kernel/cpumgr.H | 2 +-
21 src/kernel/cpumgr.C | 6 +++---
22 2 files changed, 4 insertions(+), 4 deletions(-)
23
24diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H
25index 68f8972..6e9b697 100644
26--- a/src/include/kernel/cpumgr.H
27+++ b/src/include/kernel/cpumgr.H
28@@ -215,7 +215,7 @@ class CpuManager
29 */
30 static uint64_t cv_cpuSeq;
31
32- static bool cv_forcedMemPeriodic; //!< force free / coalesce.
33+ static uint8_t cv_forcedMemPeriodic; //!< force free / coalesce.
34
35 // If a shutdown of all CPUs is requested
36 static bool cv_shutdown_requested;
37diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C
38index 44f61a1..ce7516f 100644
39--- a/src/kernel/cpumgr.C
40+++ b/src/kernel/cpumgr.C
41@@ -50,7 +50,7 @@ cpu_t** CpuManager::cv_cpus[KERNEL_MAX_SUPPORTED_NODES];
42 bool CpuManager::cv_shutdown_requested = false;
43 uint64_t CpuManager::cv_shutdown_status = 0;
44 size_t CpuManager::cv_cpuSeq = 0;
45-bool CpuManager::cv_forcedMemPeriodic = false;
46+uint8_t CpuManager::cv_forcedMemPeriodic = 0;
47 InteractiveDebug CpuManager::cv_interactive_debug;
48
49 CpuManager::CpuManager() : iv_lastStartTimebase(0)
50@@ -361,7 +361,7 @@ void CpuManager::executePeriodics(cpu_t * i_cpu)
51 }
52
53 bool forceMemoryPeriodic = __sync_fetch_and_and(&cv_forcedMemPeriodic,
54- false);
55+ 0);
56
57 ++(i_cpu->periodic_count);
58 if((0 == (i_cpu->periodic_count % CPU_PERIODIC_CHECK_MEMORY)) ||
59@@ -461,7 +461,7 @@ size_t CpuManager::getThreadCount()
60
61 void CpuManager::forceMemoryPeriodic()
62 {
63- cv_forcedMemPeriodic = true;
64+ cv_forcedMemPeriodic = 1;
65 }
66
67
68--
692.7.4
70