mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
shorten log messages; make easier to process from perl
This commit is contained in:
parent
bb8a1e7588
commit
fcff7066e9
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( "locking mutex %x", mutex );
|
logf( "tlm %p", mutex );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_lock( mutex );
|
pthread_mutex_lock( mutex );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "successfully locked mutex %x", mutex );
|
logf( "slm %p", mutex );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~MutexLock() {
|
~MutexLock() {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "UNlocking mutex %x", m_mutex );
|
logf( "ULM %p", m_mutex );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock( m_mutex );
|
pthread_mutex_unlock( m_mutex );
|
||||||
}
|
}
|
||||||
|
@ -57,16 +57,16 @@ class SocketWriteLock {
|
||||||
, m_mutex( CRefMgr::Get()->GetWriteMutexForSocket( socket ) )
|
, m_mutex( CRefMgr::Get()->GetWriteMutexForSocket( socket ) )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "locking mutex %x for socket %d", m_mutex, socket );
|
logf( "tlm %p for socket %d", m_mutex, socket );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_lock( m_mutex );
|
pthread_mutex_lock( m_mutex );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "successfully locked mutex %x for socket %d", m_mutex, socket );
|
logf( "slm %p for socket %d", m_mutex, socket );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~SocketWriteLock() {
|
~SocketWriteLock() {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "UNlocking mutex %x for socket %d", m_mutex, m_socket );
|
logf( "ULM %p for socket %d", m_mutex, m_socket );
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock( m_mutex );
|
pthread_mutex_unlock( m_mutex );
|
||||||
}
|
}
|
||||||
|
@ -80,18 +80,18 @@ class RWReadLock {
|
||||||
public:
|
public:
|
||||||
RWReadLock( pthread_rwlock_t* rwl ) {
|
RWReadLock( pthread_rwlock_t* rwl ) {
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "locking rwlock %p for read", rwl );
|
logf( "tlrr %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
pthread_rwlock_rdlock( rwl );
|
pthread_rwlock_rdlock( rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "locked rwlock %p for read", rwl );
|
logf( "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( "unlocked rwlock %p", _rwl );
|
logf( "ULRR %p", _rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,17 +103,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( "locking rwlock %p for write", rwl );
|
logf( "tlww %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
pthread_rwlock_wrlock( rwl );
|
pthread_rwlock_wrlock( rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "locked rwlock %p for write", rwl );
|
logf( "slww %p", rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~RWWriteLock() {
|
~RWWriteLock() {
|
||||||
pthread_rwlock_unlock( _rwl );
|
pthread_rwlock_unlock( _rwl );
|
||||||
#ifdef DEBUG_LOCKS
|
#ifdef DEBUG_LOCKS
|
||||||
logf( "unlocked rwlock %p", _rwl );
|
logf( "ULWW %p", _rwl );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue