mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
catch up with logf change
This commit is contained in:
parent
b7e3479989
commit
6541e56c40
1 changed files with 12 additions and 12 deletions
|
@ -32,16 +32,16 @@ class MutexLock {
|
|||
MutexLock( pthread_mutex_t* mutex ) {
|
||||
m_mutex = mutex;
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "tlm %p", mutex );
|
||||
logf( XW_LOGINFO, "tlm %p", mutex );
|
||||
#endif
|
||||
pthread_mutex_lock( mutex );
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "slm %p", mutex );
|
||||
logf( XW_LOGINFO, "slm %p", mutex );
|
||||
#endif
|
||||
}
|
||||
~MutexLock() {
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "ULM %p", m_mutex );
|
||||
logf( XW_LOGINFO, "ULM %p", m_mutex );
|
||||
#endif
|
||||
pthread_mutex_unlock( m_mutex );
|
||||
}
|
||||
|
@ -57,19 +57,19 @@ class SocketWriteLock {
|
|||
, m_mutex( CRefMgr::Get()->GetWriteMutexForSocket( socket ) )
|
||||
{
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "tlm %p for socket %d", m_mutex, socket );
|
||||
logf( XW_LOGINFO, "tlm %p for socket %d", m_mutex, socket );
|
||||
#endif
|
||||
if ( m_mutex != NULL ) {
|
||||
pthread_mutex_lock( m_mutex );
|
||||
}
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "slm %p for socket %d", m_mutex, socket );
|
||||
logf( XW_LOGINFO, "slm %p for socket %d", m_mutex, socket );
|
||||
#endif
|
||||
}
|
||||
|
||||
~SocketWriteLock() {
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "ULM %p for socket %d", m_mutex, m_socket );
|
||||
logf( XW_LOGINFO, "ULM %p for socket %d", m_mutex, m_socket );
|
||||
#endif
|
||||
if ( m_mutex != NULL ) {
|
||||
pthread_mutex_unlock( m_mutex );
|
||||
|
@ -87,18 +87,18 @@ class RWReadLock {
|
|||
public:
|
||||
RWReadLock( pthread_rwlock_t* rwl ) {
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "tlrr %p", rwl );
|
||||
logf( XW_LOGINFO, "tlrr %p", rwl );
|
||||
#endif
|
||||
pthread_rwlock_rdlock( rwl );
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "slrr %p", rwl );
|
||||
logf( XW_LOGINFO, "slrr %p", rwl );
|
||||
#endif
|
||||
_rwl = rwl;
|
||||
}
|
||||
~RWReadLock() {
|
||||
pthread_rwlock_unlock( _rwl );
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "ULRR %p", _rwl );
|
||||
logf( XW_LOGINFO, "ULRR %p", _rwl );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -110,17 +110,17 @@ class RWWriteLock {
|
|||
public:
|
||||
RWWriteLock( pthread_rwlock_t* rwl ) : _rwl(rwl) {
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "tlww %p", rwl );
|
||||
logf( XW_LOGINFO, "tlww %p", rwl );
|
||||
#endif
|
||||
pthread_rwlock_wrlock( rwl );
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "slww %p", rwl );
|
||||
logf( XW_LOGINFO, "slww %p", rwl );
|
||||
#endif
|
||||
}
|
||||
~RWWriteLock() {
|
||||
pthread_rwlock_unlock( _rwl );
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "ULWW %p", _rwl );
|
||||
logf( XW_LOGINFO, "ULWW %p", _rwl );
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue