Skip to content

Commit f353326

Browse files
author
Alexey N. Vinogradov
committed
minor: fixed shared to exclusive lock
1 parent 0b01116 commit f353326

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sphinxstd.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,15 +2992,15 @@ class CAPABILITY ( "mutex" ) CSphMutex : public ISphNoncopyable
29922992

29932993
bool Lock () ACQUIRE();
29942994
bool Unlock () RELEASE();
2995-
bool TimedLock ( int iMsec ) TRY_ACQUIRE(false);
2995+
bool TimedLock ( int iMsec ) TRY_ACQUIRE(true);
29962996

29972997
protected:
29982998
#if USE_WINDOWS
29992999
HANDLE m_hMutex;
30003000
#else
30013001
pthread_mutex_t * m_pMutex;
30023002
public:
3003-
inline pthread_mutex_t* GetInternalMutex() RETURN_CAPABILITY(this)
3003+
inline pthread_mutex_t* GetInternalMutex()
30043004
{
30053005
return m_pMutex;
30063006
}
@@ -3129,12 +3129,12 @@ class SCOPED_CAPABILITY CSphScopedRLock : ISphNoncopyable
31293129
CSphRwlock & m_tLock;
31303130
};
31313131

3132-
/// scoped shared (write) lock
3132+
/// scoped exclusive (write) lock
31333133
class SCOPED_CAPABILITY CSphScopedWLock : ISphNoncopyable
31343134
{
31353135
public:
31363136
/// lock on creation
3137-
CSphScopedWLock ( CSphRwlock & tLock ) ACQUIRE_SHARED( tLock )
3137+
CSphScopedWLock ( CSphRwlock & tLock ) ACQUIRE ( tLock )
31383138
: m_tLock ( tLock )
31393139
{
31403140
m_tLock.WriteLock();

0 commit comments

Comments
 (0)