Changeset 5645 for trunk/libtransmission/platform.c
- Timestamp:
- Apr 18, 2008, 11:17:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/platform.c
r5642 r5645 162 162 } 163 163 164 void165 tr_threadJoin( tr_thread * t )166 {167 if( t != NULL )168 {169 #ifdef __BEOS__170 long exit;171 wait_for_thread( t->thread, &exit );172 #elif defined(WIN32)173 WaitForSingleObject( t->thread_handle, INFINITE );174 CloseHandle( t->thread_handle );175 #else176 pthread_join( t->thread, NULL );177 #endif178 179 tr_dbg( "Thread '%s' joined", t->name );180 t->name = NULL;181 t->func = NULL;182 tr_free( t );183 }184 }185 186 164 /*** 187 165 **** LOCKS … … 211 189 l->lock = create_sem( 1, "" ); 212 190 #elif defined(WIN32) 213 InitializeCriticalSection( &l->lock ); /* critical sections supportrecursion */191 InitializeCriticalSection( &l->lock ); /* supports recursion */ 214 192 #else 215 193 pthread_mutexattr_t attr; … … 301 279 #else 302 280 struct passwd * pw = getpwuid( getuid() ); 303 endpwent( );304 281 if( pw ) 305 282 home = tr_strdup( pw->pw_dir ); 283 endpwent( ); 306 284 #endif 307 285 }
Note: See TracChangeset
for help on using the changeset viewer.