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 ) {
|
MutexLock( pthread_mutex_t* mutex ) {
|
||||||
m_mutex = mutex;
|
m_mutex = mutex;
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "tlm %p", mutex );
|
logf( XW_LOGINFO, "tlm %p", mutex );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_lock( mutex );
|
pthread_mutex_lock( mutex );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "slm %p", mutex );
|
logf( XW_LOGINFO, "slm %p", mutex );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~MutexLock() {
|
~MutexLock() {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "ULM %p", m_mutex );
|
logf( XW_LOGINFO, "ULM %p", m_mutex );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock( m_mutex );
|
pthread_mutex_unlock( m_mutex );
|
||||||
}
|
}
|
||||||
|
@ -57,19 +57,19 @@ class SocketWriteLock {
|
||||||
, m_mutex( CRefMgr::Get()->GetWriteMutexForSocket( socket ) )
|
, m_mutex( CRefMgr::Get()->GetWriteMutexForSocket( socket ) )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "tlm %p for socket %d", m_mutex, socket );
|
logf( XW_LOGINFO, "tlm %p for socket %d", m_mutex, socket );
|
||||||
#endif
|
#endif
|
||||||
if ( m_mutex != NULL ) {
|
if ( m_mutex != NULL ) {
|
||||||
pthread_mutex_lock( m_mutex );
|
pthread_mutex_lock( m_mutex );
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "slm %p for socket %d", m_mutex, socket );
|
logf( XW_LOGINFO, "slm %p for socket %d", m_mutex, socket );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
~SocketWriteLock() {
|
~SocketWriteLock() {
|
||||||
#ifdef DEBUG_LOCKS
|
#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
|
#endif
|
||||||
if ( m_mutex != NULL ) {
|
if ( m_mutex != NULL ) {
|
||||||
pthread_mutex_unlock( m_mutex );
|
pthread_mutex_unlock( m_mutex );
|
||||||
|
@ -87,18 +87,18 @@ class RWReadLock {
|
||||||
public:
|
public:
|
||||||
RWReadLock( pthread_rwlock_t* rwl ) {
|
RWReadLock( pthread_rwlock_t* rwl ) {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "tlrr %p", rwl );
|
logf( XW_LOGINFO, "tlrr %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
pthread_rwlock_rdlock( rwl );
|
pthread_rwlock_rdlock( rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "slrr %p", rwl );
|
logf( XW_LOGINFO, "slrr %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
_rwl = rwl;
|
_rwl = rwl;
|
||||||
}
|
}
|
||||||
~RWReadLock() {
|
~RWReadLock() {
|
||||||
pthread_rwlock_unlock( _rwl );
|
pthread_rwlock_unlock( _rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "ULRR %p", _rwl );
|
logf( XW_LOGINFO, "ULRR %p", _rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,17 +110,17 @@ class RWWriteLock {
|
||||||
public:
|
public:
|
||||||
RWWriteLock( pthread_rwlock_t* rwl ) : _rwl(rwl) {
|
RWWriteLock( pthread_rwlock_t* rwl ) : _rwl(rwl) {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "tlww %p", rwl );
|
logf( XW_LOGINFO, "tlww %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
pthread_rwlock_wrlock( rwl );
|
pthread_rwlock_wrlock( rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "slww %p", rwl );
|
logf( XW_LOGINFO, "slww %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~RWWriteLock() {
|
~RWWriteLock() {
|
||||||
pthread_rwlock_unlock( _rwl );
|
pthread_rwlock_unlock( _rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "ULWW %p", _rwl );
|
logf( XW_LOGINFO, "ULWW %p", _rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue