Loading src/common/compat.c +7 −2 Original line number Diff line number Diff line Loading @@ -1183,7 +1183,6 @@ tor_addr_lookup(const char *name, uint16_t family, tor_addr_t *addr) } return 0; } memset(addr, 0, sizeof(tor_addr_t)); /* XXXX020 is this redundant? */ #ifdef MS_WINDOWS return (err == WSATRY_AGAIN) ? 1 : -1; #else Loading Loading @@ -1701,6 +1700,7 @@ struct tor_mutex_t { /* Conditions. */ #ifdef USE_PTHREADS #if 0 /** Cross-platform condtion implementation. */ struct tor_cond_t { pthread_cond_t cond; Loading Loading @@ -1747,12 +1747,14 @@ tor_cond_signal_all(tor_cond_t *cond) { pthread_cond_broadcast(&cond->cond); } #endif /** Set up common structures for use by threading. */ void tor_threads_init(void) { } #elif defined(USE_WIN32_THREADS) #if 0 static DWORD cond_event_tls_index; struct tor_cond_t { CRITICAL_SECTION mutex; Loading @@ -1771,7 +1773,7 @@ tor_cond_free(tor_cond_t *cond) { tor_assert(cond); DeleteCriticalSection(&cond->mutex); /* XXXX020 notify? */ /* XXXX notify? */ smartlist_free(cond->events); tor_free(cond); } Loading Loading @@ -1834,10 +1836,13 @@ tor_cond_signal_all(tor_cond_t *cond) smartlist_clear(cond->events); LeaveCriticalSection(&cond->mutex); } #endif void tor_threads_init(void) { #if 0 cond_event_tls_index = TlsAlloc(); #endif } #endif Loading src/common/compat.h +2 −1 Original line number Diff line number Diff line Loading @@ -363,7 +363,6 @@ IPV4IP(const tor_addr_t *a) } static INLINE uint32_t IPV4IPh(const tor_addr_t *a) { /*XXXX020 remove this function */ return ntohl(IPV4IP(a)); } static INLINE uint32_t Loading Loading @@ -483,6 +482,7 @@ void tor_threads_init(void); #endif #ifdef TOR_IS_MULTITHREADED #if 0 typedef struct tor_cond_t tor_cond_t; tor_cond_t *tor_cond_new(void); void tor_cond_free(tor_cond_t *cond); Loading @@ -490,6 +490,7 @@ int tor_cond_wait(tor_cond_t *cond, tor_mutex_t *mutex); void tor_cond_signal_one(tor_cond_t *cond); void tor_cond_signal_all(tor_cond_t *cond); #endif #endif /* Platform-specific helpers. */ #ifdef MS_WINDOWS Loading Loading
src/common/compat.c +7 −2 Original line number Diff line number Diff line Loading @@ -1183,7 +1183,6 @@ tor_addr_lookup(const char *name, uint16_t family, tor_addr_t *addr) } return 0; } memset(addr, 0, sizeof(tor_addr_t)); /* XXXX020 is this redundant? */ #ifdef MS_WINDOWS return (err == WSATRY_AGAIN) ? 1 : -1; #else Loading Loading @@ -1701,6 +1700,7 @@ struct tor_mutex_t { /* Conditions. */ #ifdef USE_PTHREADS #if 0 /** Cross-platform condtion implementation. */ struct tor_cond_t { pthread_cond_t cond; Loading Loading @@ -1747,12 +1747,14 @@ tor_cond_signal_all(tor_cond_t *cond) { pthread_cond_broadcast(&cond->cond); } #endif /** Set up common structures for use by threading. */ void tor_threads_init(void) { } #elif defined(USE_WIN32_THREADS) #if 0 static DWORD cond_event_tls_index; struct tor_cond_t { CRITICAL_SECTION mutex; Loading @@ -1771,7 +1773,7 @@ tor_cond_free(tor_cond_t *cond) { tor_assert(cond); DeleteCriticalSection(&cond->mutex); /* XXXX020 notify? */ /* XXXX notify? */ smartlist_free(cond->events); tor_free(cond); } Loading Loading @@ -1834,10 +1836,13 @@ tor_cond_signal_all(tor_cond_t *cond) smartlist_clear(cond->events); LeaveCriticalSection(&cond->mutex); } #endif void tor_threads_init(void) { #if 0 cond_event_tls_index = TlsAlloc(); #endif } #endif Loading
src/common/compat.h +2 −1 Original line number Diff line number Diff line Loading @@ -363,7 +363,6 @@ IPV4IP(const tor_addr_t *a) } static INLINE uint32_t IPV4IPh(const tor_addr_t *a) { /*XXXX020 remove this function */ return ntohl(IPV4IP(a)); } static INLINE uint32_t Loading Loading @@ -483,6 +482,7 @@ void tor_threads_init(void); #endif #ifdef TOR_IS_MULTITHREADED #if 0 typedef struct tor_cond_t tor_cond_t; tor_cond_t *tor_cond_new(void); void tor_cond_free(tor_cond_t *cond); Loading @@ -490,6 +490,7 @@ int tor_cond_wait(tor_cond_t *cond, tor_mutex_t *mutex); void tor_cond_signal_one(tor_cond_t *cond); void tor_cond_signal_all(tor_cond_t *cond); #endif #endif /* Platform-specific helpers. */ #ifdef MS_WINDOWS Loading