Ignore:
Timestamp:
Dec 2, 2007, 5:15:52 PM (13 years ago)
Author:
charles
Message:

possibly get the pthread changes compiling for old versions of Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r4040 r4041  
    4040#else
    4141  #define _XOPEN_SOURCE 500 /* needed for recursive locks. */
     42  #ifndef __USE_UNIX98
     43  #define __USE_UNIX98 /* some older Linuxes need it spelt out for them */
     44  #endif
    4245  #include <pthread.h>
    4346#endif
     
    250253    l->lockThread = currentThread;
    251254    ++l->depth;
     255    assert( l->depth >= 1 );
    252256}
    253257
     
    256260{
    257261    return ( l->depth > 0 )
    258         && ( l->lockThread == tr_getCurrentThread() );
     262        && ( tr_areThreadsEqual( l->lockThread, tr_getCurrentThread() ) );
    259263}
    260264
     
    262266tr_lockUnlock( tr_lock * l )
    263267{
     268    assert( l->depth > 0 );
     269    assert( tr_areThreadsEqual( l->lockThread, tr_getCurrentThread() ));
    264270    assert( tr_lockHave( l ) );
    265271
     
    272278#endif
    273279    --l->depth;
     280    assert( l->depth >= 0 );
    274281}
    275282
Note: See TracChangeset for help on using the changeset viewer.