Ignore:
Timestamp:
Nov 16, 2007, 8:38:51 PM (13 years ago)
Author:
charles
Message:

remove dead code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r3775 r3838  
    232232}
    233233
    234 int
    235 tr_lockTryLock( tr_lock * l ) /* success on zero! */
    236 {
    237 #ifdef __BEOS__
    238     return acquire_sem_etc( l->lock, 1, B_RELATIVE_TIMEOUT, 0 );
    239 #elif defined(WIN32)
    240     return !TryEnterCriticalSection( &l->lock );
    241 #else
    242     return pthread_mutex_trylock( &l->lock );
    243 #endif
    244 }
    245 
    246234void
    247235tr_lockLock( tr_lock * l )
    248236{
    249     tr_thread_id currentThread = tr_getCurrentThread( );
     237    const tr_thread_id currentThread = tr_getCurrentThread( );
     238
    250239    if( l->lockThread == currentThread )
    251240    {
     
    261250        pthread_mutex_lock( &l->lock );
    262251#endif
    263         l->lockThread = tr_getCurrentThread( );
     252        l->lockThread = currentThread;
    264253        l->depth = 1;
    265254    }
Note: See TracChangeset for help on using the changeset viewer.