remove dead code

This commit is contained in:
Charles Kerr 2007-11-16 20:38:51 +00:00
parent 73680b6263
commit d2a5dd50d3
2 changed files with 3 additions and 15 deletions

View File

@ -231,22 +231,11 @@ tr_lockFree( tr_lock * l )
tr_free( l );
}
int
tr_lockTryLock( tr_lock * l ) /* success on zero! */
{
#ifdef __BEOS__
return acquire_sem_etc( l->lock, 1, B_RELATIVE_TIMEOUT, 0 );
#elif defined(WIN32)
return !TryEnterCriticalSection( &l->lock );
#else
return pthread_mutex_trylock( &l->lock );
#endif
}
void
tr_lockLock( tr_lock * l )
{
tr_thread_id currentThread = tr_getCurrentThread( );
const tr_thread_id currentThread = tr_getCurrentThread( );
if( l->lockThread == currentThread )
{
++l->depth;
@ -260,7 +249,7 @@ tr_lockLock( tr_lock * l )
#else
pthread_mutex_lock( &l->lock );
#endif
l->lockThread = tr_getCurrentThread( );
l->lockThread = currentThread;
l->depth = 1;
}
}

View File

@ -38,7 +38,6 @@ int tr_amInThread ( const tr_thread * );
tr_lock * tr_lockNew ( void );
void tr_lockFree ( tr_lock * );
int tr_lockTryLock ( tr_lock * );
void tr_lockLock ( tr_lock * );
void tr_lockUnlock ( tr_lock * );
int tr_lockHave ( const tr_lock * );