[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r13380: Fix a couple of XXX020 items. Also, disable all "condition" (in tor/trunk: . src/common)
Author: nickm
Date: 2008-02-05 14:40:19 -0500 (Tue, 05 Feb 2008)
New Revision: 13380
Modified:
tor/trunk/
tor/trunk/src/common/compat.c
tor/trunk/src/common/compat.h
Log:
r17899@catbus: nickm | 2008-02-05 14:14:06 -0500
Fix a couple of XXX020 items. Also, disable all "condition" sychronization code, since Tor does not use it yet
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r17899] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c 2008-02-05 19:40:17 UTC (rev 13379)
+++ tor/trunk/src/common/compat.c 2008-02-05 19:40:19 UTC (rev 13380)
@@ -1183,7 +1183,6 @@
}
return 0;
}
- memset(addr, 0, sizeof(tor_addr_t)); /* XXXX020 is this redundant? */
#ifdef MS_WINDOWS
return (err == WSATRY_AGAIN) ? 1 : -1;
#else
@@ -1701,6 +1700,7 @@
/* Conditions. */
#ifdef USE_PTHREADS
+#if 0
/** Cross-platform condtion implementation. */
struct tor_cond_t {
pthread_cond_t cond;
@@ -1747,12 +1747,14 @@
{
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;
@@ -1771,7 +1773,7 @@
{
tor_assert(cond);
DeleteCriticalSection(&cond->mutex);
- /* XXXX020 notify? */
+ /* XXXX notify? */
smartlist_free(cond->events);
tor_free(cond);
}
@@ -1834,10 +1836,13 @@
smartlist_clear(cond->events);
LeaveCriticalSection(&cond->mutex);
}
+#endif
void
tor_threads_init(void)
{
+#if 0
cond_event_tls_index = TlsAlloc();
+#endif
}
#endif
Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h 2008-02-05 19:40:17 UTC (rev 13379)
+++ tor/trunk/src/common/compat.h 2008-02-05 19:40:19 UTC (rev 13380)
@@ -363,7 +363,6 @@
}
static INLINE uint32_t IPV4IPh(const tor_addr_t *a)
{
- /*XXXX020 remove this function */
return ntohl(IPV4IP(a));
}
static INLINE uint32_t
@@ -483,6 +482,7 @@
#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);
@@ -490,6 +490,7 @@
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