From: Oliver Kurth Date: Wed, 27 Feb 2019 22:39:57 +0000 (-0800) Subject: Changes to common header files not applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89dcc97adf9ed58ed3f2f89ca354ee55353e8317;p=thirdparty%2Fopen-vm-tools.git Changes to common header files not applicable to open-vm-tools. --- 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; \