From: VMware, Inc <> Date: Mon, 26 Jul 2010 19:09:35 +0000 (-0700) Subject: lib/lock: review comments X-Git-Tag: 2010.07.25-280253~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec1d86e20185c16f865616021d4afa82e027320b;p=thirdparty%2Fopen-vm-tools.git lib/lock: review comments Don't "Ex", make the name formally "Silent". Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/userlock.h b/open-vm-tools/lib/include/userlock.h index 92c95b6f2..c356e0556 100644 --- a/open-vm-tools/lib/include/userlock.h +++ b/open-vm-tools/lib/include/userlock.h @@ -75,9 +75,8 @@ Bool MXUser_TimedWaitCondVarExclLock(MXUserExclLock *lock, MXUserRecLock *MXUser_CreateRecLock(const char *name, MX_Rank rank); -MXUserRecLock *MXUser_CreateRecLockEx(const char *name, - MX_Rank rank, - Bool beSilent); +MXUserRecLock *MXUser_CreateRecLockSilent(const char *name, + MX_Rank rank); void MXUser_AcquireRecLock(MXUserRecLock *lock); Bool MXUser_TryAcquireRecLock(MXUserRecLock *lock); diff --git a/open-vm-tools/lib/lock/ulRec.c b/open-vm-tools/lib/lock/ulRec.c index 28c672660..bb22b7db7 100644 --- a/open-vm-tools/lib/lock/ulRec.c +++ b/open-vm-tools/lib/lock/ulRec.c @@ -170,11 +170,10 @@ MXUserDumpRecLock(MXUserHeader *header) // IN: /* *----------------------------------------------------------------------------- * - * MXUser_CreateRecLockEx -- + * MXUserCreateRecLock -- * * Create a recursive lock specifying if the lock must always be - * silent - never logging any messages. Silent locks will never - * produce any statistics, amongst the aspects of "silent". + * silent. * * Only the owner (thread) of a recursive lock may recurse on it. * @@ -188,10 +187,10 @@ MXUserDumpRecLock(MXUserHeader *header) // IN: *----------------------------------------------------------------------------- */ -MXUserRecLock * -MXUser_CreateRecLockEx(const char *userName, // IN: - MX_Rank rank, // IN: - Bool beSilent) // IN: +static MXUserRecLock * +MXUserCreateRecLock(const char *userName, // IN: + MX_Rank rank, // IN: + Bool beSilent) // IN: { char *properName; MXUserStats *stats; @@ -245,6 +244,34 @@ MXUser_CreateRecLockEx(const char *userName, // IN: } +/* + *----------------------------------------------------------------------------- + * + * MXUser_CreateRecLockSilent -- + * + * Create a recursive lock specifying if the lock must always be + * silent - never logging any messages. Silent locks will never + * produce any statistics, amongst the aspects of "silent". + * + * Only the owner (thread) of a recursive lock may recurse on it. + * + * Results: + * NULL Creation failed + * !NULL Creation succeeded + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +MXUserRecLock * +MXUser_CreateRecLockSilent(const char *userName, // IN: + MX_Rank rank) // IN: +{ + return MXUserCreateRecLock(userName, rank, TRUE); +} + /* *----------------------------------------------------------------------------- * @@ -268,7 +295,7 @@ MXUserRecLock * MXUser_CreateRecLock(const char *userName, // IN: MX_Rank rank) // IN: { - return MXUser_CreateRecLockEx(userName, rank, FALSE); + return MXUserCreateRecLock(userName, rank, FALSE); }