[Lldb-commits] [lldb] r155080 - /lldb/trunk/include/lldb/Host/ReadWriteLock.h

Jim Ingham jingham at apple.com
Wed Apr 18 17:19:47 PDT 2012


Author: jingham
Date: Wed Apr 18 19:19:47 2012
New Revision: 155080

URL: http://llvm.org/viewvc/llvm-project?rev=155080&view=rev
Log:
Add a WriteTryLock function.

Modified:
    lldb/trunk/include/lldb/Host/ReadWriteLock.h

Modified: lldb/trunk/include/lldb/Host/ReadWriteLock.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ReadWriteLock.h?rev=155080&r1=155079&r2=155080&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/ReadWriteLock.h (original)
+++ lldb/trunk/include/lldb/Host/ReadWriteLock.h Wed Apr 18 19:19:47 2012
@@ -78,6 +78,12 @@
     }
     
     bool
+    WriteTryLock()
+    {
+        return ::pthread_rwlock_trywrlock (&m_rwlock) == 0;
+    }
+    
+    bool
     WriteUnlock ()
     {
         return ::pthread_rwlock_unlock (&m_rwlock) == 0;





More information about the lldb-commits mailing list