From: VMware, Inc <> Date: Mon, 21 Nov 2011 22:47:15 +0000 (-0800) Subject: Fix stats builds X-Git-Tag: 2011.11.20-535097~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3112f23c8db7a5b9d245d4f272a2ecfc88fbd498;p=thirdparty%2Fopen-vm-tools.git Fix stats builds The MXUser internal singleton lock routine is used by stats and debug; it needs to be there for both types of builds. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/lock/ul.c b/open-vm-tools/lib/lock/ul.c index 4aaff77b8..2d579e478 100644 --- a/open-vm-tools/lib/lock/ul.c +++ b/open-vm-tools/lib/lock/ul.c @@ -37,17 +37,6 @@ Bool (*MXUserMX_TryLockRec)(struct MX_MutexRec *lock) = NULL; Bool (*MXUserMX_IsLockedByCurThreadRec)(const struct MX_MutexRec *lock) = NULL; -#if defined(MXUSER_DEBUG) -#define MXUSER_MAX_LOCKS_PER_THREAD (2 * MXUSER_MAX_REC_DEPTH) - -typedef struct { - uint32 locksHeld; - MXUserHeader *lockArray[MXUSER_MAX_LOCKS_PER_THREAD]; -} MXUserPerThread; - -static Atomic_Ptr hashTableMem; - - /* *----------------------------------------------------------------------------- * @@ -96,6 +85,17 @@ MXUserInternalSingleton(Atomic_Ptr *storage) // IN: } +#if defined(MXUSER_DEBUG) +#define MXUSER_MAX_LOCKS_PER_THREAD (2 * MXUSER_MAX_REC_DEPTH) + +typedef struct { + uint32 locksHeld; + MXUserHeader *lockArray[MXUSER_MAX_LOCKS_PER_THREAD]; +} MXUserPerThread; + +static Atomic_Ptr hashTableMem; + + /* *----------------------------------------------------------------------------- *