[llvm-commits] [llvm] r73545 - in /llvm/trunk: include/llvm/System/RWMutex.h lib/System/RWMutex.cpp lib/System/Unix/RWMutex.inc lib/System/Win32/Mutex.inc lib/System/Win32/RWMutex.inc

Duncan Sands baldrick at free.fr
Wed Jun 17 00:52:13 PDT 2009


Hi Owen,

> +      /// Attempts to unconditionally acquire the lock in reader mode. If the
> +      /// lock is held by a writer, this method will wait until it can acquire
> +      /// the lock. 
> +      /// @returns false if any kind of error occurs, true otherwise.
> +      /// @brief Unconditionally acquire the lock in reader mode.
> +      bool reader_acquire();

what kind of error can occur?  Taking a quick glance at the
implementation, it looks like failure means that the platform
doesn't support pthreads.  In that case, wouldn't it be better
to abort rather than returning an error result that probably
no-one will ever check?

Ciao,

Duncan.



More information about the llvm-commits mailing list