Changeset 4041 for trunk/libtransmission/platform.c
- Timestamp:
- Dec 2, 2007, 5:15:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/platform.c
r4040 r4041 40 40 #else 41 41 #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 42 45 #include <pthread.h> 43 46 #endif … … 250 253 l->lockThread = currentThread; 251 254 ++l->depth; 255 assert( l->depth >= 1 ); 252 256 } 253 257 … … 256 260 { 257 261 return ( l->depth > 0 ) 258 && ( l->lockThread == tr_getCurrentThread() );262 && ( tr_areThreadsEqual( l->lockThread, tr_getCurrentThread() ) ); 259 263 } 260 264 … … 262 266 tr_lockUnlock( tr_lock * l ) 263 267 { 268 assert( l->depth > 0 ); 269 assert( tr_areThreadsEqual( l->lockThread, tr_getCurrentThread() )); 264 270 assert( tr_lockHave( l ) ); 265 271 … … 272 278 #endif 273 279 --l->depth; 280 assert( l->depth >= 0 ); 274 281 } 275 282
Note: See TracChangeset
for help on using the changeset viewer.