]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/lock: review comments
authorVMware, Inc <>
Mon, 26 Jul 2010 19:09:35 +0000 (12:09 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 26 Jul 2010 19:09:35 +0000 (12:09 -0700)
Don't "Ex", make the name formally "Silent".

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/userlock.h
open-vm-tools/lib/lock/ulRec.c

index 92c95b6f2aa3b6b091ca9f33eb0b18016e782136..c356e05561d4ebba736dde950d046dd93a642d9c 100644 (file)
@@ -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);
index 28c67266010f8bf0c54c6a85867938e2da3def15..bb22b7db7e66a031a610051fe7371e2b8a2008db 100644 (file)
@@ -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);
 }