1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 13:16:53 +00:00

(trunk libT) rename tr_wait() tr_wait_msec()

This commit is contained in:
Charles Kerr 2010-01-01 22:30:36 +00:00
parent 08af516e12
commit 283b6d6a36
6 changed files with 14 additions and 14 deletions

View file

@ -542,7 +542,7 @@ tr_sessionInit( const char * tag,
data.clientSettings = clientSettings;
tr_runInEventThread( session, tr_sessionInitImpl, &data );
while( session->waiting > 0 )
tr_wait( 100 );
tr_wait_msec( 100 );
return session;
}
@ -819,7 +819,7 @@ tr_sessionSet( tr_session * session, struct tr_benc * settings )
++session->waiting;
tr_runInEventThread( session, sessionSetImpl, &data );
while( session->waiting > 0 )
tr_wait( 100 );
tr_wait_msec( 100 );
}
/***
@ -1526,7 +1526,7 @@ tr_sessionClose( tr_session * session )
while( !session->isClosed && !deadlineReached( deadline ) )
{
dbgmsg( "waiting for the libtransmission thread to finish" );
tr_wait( 100 );
tr_wait_msec( 100 );
}
/* "shared" and "tracker" have live sockets,
@ -1538,7 +1538,7 @@ tr_sessionClose( tr_session * session )
{
dbgmsg( "waiting on port unmap (%p) or announcer (%p)",
session->shared, session->announcer );
tr_wait( 100 );
tr_wait_msec( 100 );
}
tr_fdClose( session );
@ -1549,7 +1549,7 @@ tr_sessionClose( tr_session * session )
{
static tr_bool forced = FALSE;
dbgmsg( "waiting for libtransmission thread to finish" );
tr_wait( 100 );
tr_wait_msec( 100 );
if( deadlineReached( deadline ) && !forced )
{
event_loopbreak( );

View file

@ -515,11 +515,11 @@ getstatus( void * cl )
}
int
tr_dhtStatus( tr_session * ss, int af, int * nodes_return )
tr_dhtStatus( tr_session * session, int af, int * nodes_return )
{
struct getstatus_closure closure = { af, -1, -1 };
if( !tr_dhtEnabled( ss ) ||
if( !tr_dhtEnabled( session ) ||
(af == AF_INET && dht_socket < 0) ||
(af == AF_INET6 && dht6_socket < 0) ) {
if( nodes_return )
@ -527,9 +527,9 @@ tr_dhtStatus( tr_session * ss, int af, int * nodes_return )
return TR_DHT_STOPPED;
}
tr_runInEventThread( ss, getstatus, &closure );
tr_runInEventThread( session, getstatus, &closure );
while( closure.status < 0 )
tr_wait( 10 /*msec*/ );
tr_wait_msec( 10 /*msec*/ );
if( nodes_return )
*nodes_return = closure.count;

View file

@ -250,7 +250,7 @@ tr_eventInit( tr_session * session )
/* wait until the libevent thread is running */
while( session->events == NULL )
tr_wait( 100 );
tr_wait_msec( 100 );
}
void

View file

@ -785,7 +785,7 @@ tr_date( void )
}
void
tr_wait( uint64_t delay_milliseconds )
tr_wait_msec( uint64_t delay_milliseconds )
{
#ifdef WIN32
Sleep( (DWORD)delay_milliseconds );

View file

@ -267,7 +267,7 @@ void tr_timerAddMsec( struct event * timer, int milliseconds ) TR_GNUC_NONNULL(1
uint64_t tr_date( void );
/** @brief sleep the specified number of milliseconds */
void tr_wait( uint64_t delay_milliseconds );
void tr_wait_msec( uint64_t delay_milliseconds );
/**
* @brief make a copy of 'str' whose non-utf8 content has been corrected or stripped

View file

@ -142,7 +142,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
* way towards reducing IO load... */
if( lastSleptAt != now ) {
lastSleptAt = now;
tr_wait( MSEC_TO_SLEEP_PER_SECOND_DURING_VERIFY );
tr_wait_msec( MSEC_TO_SLEEP_PER_SECOND_DURING_VERIFY );
}
SHA1_Init( &sha );
@ -357,7 +357,7 @@ tr_verifyRemove( tr_torrent * tor )
while( stopCurrent )
{
tr_lockUnlock( lock );
tr_wait( 100 );
tr_wait_msec( 100 );
tr_lockLock( lock );
}
}