From 89dcc97adf9ed58ed3f2f89ca354ee55353e8317 Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Wed, 27 Feb 2019 14:39:57 -0800 Subject: [PATCH] Changes to common header files not applicable to open-vm-tools. --- open-vm-tools/lib/include/vm_assert.h | 2 +- open-vm-tools/lib/include/vm_basic_defs.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/open-vm-tools/lib/include/vm_assert.h b/open-vm-tools/lib/include/vm_assert.h index f15d26aa0..28671d45d 100644 --- a/open-vm-tools/lib/include/vm_assert.h +++ b/open-vm-tools/lib/include/vm_assert.h @@ -241,7 +241,7 @@ void WarningThrottled(uint32 *count, const char *fmt, ...) PRINTF_DECL(2, 3); #define NOT_TESTED_1024() \ do { \ - static VMM_ONLY(PERVCPU) uint16 count = 0; \ + static MONITOR_ONLY(PERVCPU) uint16 count = 0; \ if (UNLIKELY(count == 0)) { NOT_TESTED(); } \ count = (count + 1) & 1023; \ } while (0) diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index fea26acd6..cd3189fd9 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -711,6 +711,12 @@ typedef int pid_t; #define ULM_ONLY(x) #endif +#if defined(VMM) || defined(ULVMM) +#define MONITOR_ONLY(x) x +#else +#define MONITOR_ONLY(x) +#endif + #if defined(VMM) || defined(VMKERNEL) #define USER_ONLY(x) #else @@ -759,7 +765,7 @@ typedef int pid_t; /* This is not intended to be thread-safe. */ #define DO_ONCE(code) \ do { \ - static VMM_ONLY(PERVCPU) Bool _doOnceDone = FALSE; \ + static MONITOR_ONLY(PERVCPU) Bool _doOnceDone = FALSE; \ if (UNLIKELY(!_doOnceDone)) { \ _doOnceDone = TRUE; \ code; \ -- 2.47.3