Skip to content
Permalink
Browse files

minor: fixed shared to exclusive lock

  • Loading branch information
Alexey N. Vinogradov
Alexey N. Vinogradov committed Jul 18, 2017
1 parent 0b01116 commit f3533269dff58e8656f9b017c580a4237164157c
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/sphinxstd.h
@@ -2992,15 +2992,15 @@ class CAPABILITY ( "mutex" ) CSphMutex : public ISphNoncopyable

bool Lock () ACQUIRE();
bool Unlock () RELEASE();
bool TimedLock ( int iMsec ) TRY_ACQUIRE(false);
bool TimedLock ( int iMsec ) TRY_ACQUIRE(true);

protected:
#if USE_WINDOWS
HANDLE m_hMutex;
#else
pthread_mutex_t * m_pMutex;
public:
inline pthread_mutex_t* GetInternalMutex() RETURN_CAPABILITY(this)
inline pthread_mutex_t* GetInternalMutex()
{
return m_pMutex;
}
@@ -3129,12 +3129,12 @@ class SCOPED_CAPABILITY CSphScopedRLock : ISphNoncopyable
CSphRwlock & m_tLock;
};

/// scoped shared (write) lock
/// scoped exclusive (write) lock
class SCOPED_CAPABILITY CSphScopedWLock : ISphNoncopyable
{
public:
/// lock on creation
CSphScopedWLock ( CSphRwlock & tLock ) ACQUIRE_SHARED( tLock )
CSphScopedWLock ( CSphRwlock & tLock ) ACQUIRE ( tLock )
: m_tLock ( tLock )
{
m_tLock.WriteLock();

0 comments on commit f353326

Please sign in to comment.
You can’t perform that action at this time.