From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:28 +0000 (-0700) Subject: Revert previous commit. X-Git-Tag: stable-10.2.0~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a418e3a9bf2bdb32cc86b295319024e3d6f3a128;p=thirdparty%2Fopen-vm-tools.git Revert previous commit. --- diff --git a/open-vm-tools/lib/include/userlock.h b/open-vm-tools/lib/include/userlock.h index a85aa625e..039f94659 100644 --- a/open-vm-tools/lib/include/userlock.h +++ b/open-vm-tools/lib/include/userlock.h @@ -57,29 +57,9 @@ void MXUser_ReleaseExclLock(MXUserExclLock *lock); void MXUser_DestroyExclLock(MXUserExclLock *lock); Bool MXUser_IsCurThreadHoldingExclLock(MXUserExclLock *lock); -/* Use only when necessary */ -MXUserExclLock *MXUser_CreateSingletonExclLockInt(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank); - -/* This is the public interface */ -static INLINE MXUserExclLock * -MXUser_CreateSingletonExclLock(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank) -{ - MXUserExclLock *lock; - - ASSERT(lockStorage); - - lock = (MXUserExclLock *) Atomic_ReadPtr(lockStorage); - - if (UNLIKELY(lock == NULL)) { - lock = MXUser_CreateSingletonExclLockInt(lockStorage, name, rank); - } - - return lock; -} +MXUserExclLock *MXUser_CreateSingletonExclLock(Atomic_Ptr *lockStorage, + const char *name, + MX_Rank rank); MXUserCondVar *MXUser_CreateCondVarExclLock(MXUserExclLock *lock); @@ -118,29 +98,9 @@ void MXUser_ReleaseRecLock(MXUserRecLock *lock); void MXUser_DestroyRecLock(MXUserRecLock *lock); Bool MXUser_IsCurThreadHoldingRecLock(MXUserRecLock *lock); -/* Use only when necessary */ -MXUserRecLock *MXUser_CreateSingletonRecLockInt(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank); - -/* This is the public interface */ -static INLINE MXUserRecLock * -MXUser_CreateSingletonRecLock(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank) -{ - MXUserRecLock *lock; - - ASSERT(lockStorage); - - lock = (MXUserRecLock *) Atomic_ReadPtr(lockStorage); - - if (UNLIKELY(lock == NULL)) { - lock = MXUser_CreateSingletonRecLockInt(lockStorage, name, rank); - } - - return lock; -} +MXUserRecLock *MXUser_CreateSingletonRecLock(Atomic_Ptr *lockStorage, + const char *name, + MX_Rank rank); void MXUser_DumpRecLock(MXUserRecLock *lock); @@ -192,29 +152,9 @@ void MXUser_DestroyRWLock(MXUserRWLock *lock); Bool MXUser_IsCurThreadHoldingRWLock(MXUserRWLock *lock, uint32 queryType); -/* Use only when necessary */ -MXUserRWLock *MXUser_CreateSingletonRWLockInt(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank); - -/* This is the public interface */ -static INLINE MXUserRWLock * -MXUser_CreateSingletonRWLock(Atomic_Ptr *lockStorage, - const char *name, - MX_Rank rank) -{ - MXUserRWLock *lock; - - ASSERT(lockStorage); - - lock = (MXUserRWLock *) Atomic_ReadPtr(lockStorage); - - if (UNLIKELY(lock == NULL)) { - lock = MXUser_CreateSingletonRWLockInt(lockStorage, name, rank); - } - - return lock; -} +MXUserRWLock *MXUser_CreateSingletonRWLock(Atomic_Ptr *lockStorage, + const char *name, + MX_Rank rank); /* * Stateful auto-reset event diff --git a/open-vm-tools/lib/lock/ulExcl.c b/open-vm-tools/lib/lock/ulExcl.c index a12778b6a..8a7a3b109 100644 --- a/open-vm-tools/lib/lock/ulExcl.c +++ b/open-vm-tools/lib/lock/ulExcl.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -638,7 +638,7 @@ MXUser_IsCurThreadHoldingExclLock(MXUserExclLock *lock) // IN: /* *----------------------------------------------------------------------------- * - * MXUser_CreateSingletonExclLockInt -- + * MXUser_CreateSingletonExclLock -- * * Ensures that the specified backing object (Atomic_Ptr) contains a * exclusive lock. This is useful for modules that need to protect @@ -655,9 +655,9 @@ MXUser_IsCurThreadHoldingExclLock(MXUserExclLock *lock) // IN: */ MXUserExclLock * -MXUser_CreateSingletonExclLockInt(Atomic_Ptr *lockStorage, // IN/OUT: - const char *name, // IN: - MX_Rank rank) // IN: +MXUser_CreateSingletonExclLock(Atomic_Ptr *lockStorage, // IN/OUT: + const char *name, // IN: + MX_Rank rank) // IN: { MXUserExclLock *lock; diff --git a/open-vm-tools/lib/lock/ulRW.c b/open-vm-tools/lib/lock/ulRW.c index fc801f44e..d16782fde 100644 --- a/open-vm-tools/lib/lock/ulRW.c +++ b/open-vm-tools/lib/lock/ulRW.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -865,7 +865,7 @@ MXUser_ReleaseRWLock(MXUserRWLock *lock) // IN/OUT: /* *----------------------------------------------------------------------------- * - * MXUser_CreateSingletonRWLockInt -- + * MXUser_CreateSingletonRWLock -- * * Ensures that the specified backing object (Atomic_Ptr) contains a * RW lock. This is useful for modules that need to protect something @@ -882,9 +882,9 @@ MXUser_ReleaseRWLock(MXUserRWLock *lock) // IN/OUT: */ MXUserRWLock * -MXUser_CreateSingletonRWLockInt(Atomic_Ptr *lockStorage, // IN/OUT: - const char *name, // IN: - MX_Rank rank) // IN: +MXUser_CreateSingletonRWLock(Atomic_Ptr *lockStorage, // IN/OUT: + const char *name, // IN: + MX_Rank rank) // IN: { MXUserRWLock *lock; diff --git a/open-vm-tools/lib/lock/ulRec.c b/open-vm-tools/lib/lock/ulRec.c index e320946c3..b05739469 100644 --- a/open-vm-tools/lib/lock/ulRec.c +++ b/open-vm-tools/lib/lock/ulRec.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -715,7 +715,7 @@ MXUser_IsCurThreadHoldingRecLock(MXUserRecLock *lock) // IN: /* *----------------------------------------------------------------------------- * - * MXUser_CreateSingletonRecLockInt -- + * MXUser_CreateSingletonRecLock -- * * Ensures that the specified backing object (Atomic_Ptr) contains a * recursive lock. This is useful for modules that need to protect @@ -732,9 +732,9 @@ MXUser_IsCurThreadHoldingRecLock(MXUserRecLock *lock) // IN: */ MXUserRecLock * -MXUser_CreateSingletonRecLockInt(Atomic_Ptr *lockStorage, // IN/OUT: - const char *name, // IN: - MX_Rank rank) // IN: +MXUser_CreateSingletonRecLock(Atomic_Ptr *lockStorage, // IN/OUT: + const char *name, // IN: + MX_Rank rank) // IN: { MXUserRecLock *lock;