[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3196 - in GNUnet/src: applications/bootstrap_http applicat
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3196 - in GNUnet/src: applications/bootstrap_http applications/datastore applications/dht/tools applications/fragmentation applications/fs/ecrs applications/fs/fsui applications/fs/lib applications/rpc applications/session applications/tbench applications/testbed transports util/threads |
Date: |
Sun, 30 Jul 2006 20:56:55 -0700 (PDT) |
Author: grothoff
Date: 2006-07-30 20:56:48 -0700 (Sun, 30 Jul 2006)
New Revision: 3196
Modified:
GNUnet/src/applications/bootstrap_http/http.c
GNUnet/src/applications/datastore/prefetch.c
GNUnet/src/applications/dht/tools/dht_api.c
GNUnet/src/applications/dht/tools/dhttest2.c
GNUnet/src/applications/fragmentation/fragmentationtest.c
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/namespacetest.c
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/searchtest.c
GNUnet/src/applications/fs/fsui/downloadtest.c
GNUnet/src/applications/fs/fsui/fsuitest.c
GNUnet/src/applications/fs/fsui/fsuitest2.c
GNUnet/src/applications/fs/fsui/namespace_infotest.c
GNUnet/src/applications/fs/fsui/searchtest.c
GNUnet/src/applications/fs/lib/fslib.c
GNUnet/src/applications/fs/lib/fslibtest.c
GNUnet/src/applications/rpc/rpc.c
GNUnet/src/applications/session/sessiontest.c
GNUnet/src/applications/tbench/tbench.c
GNUnet/src/applications/tbench/tbenchtest.c
GNUnet/src/applications/tbench/tbenchtest_udp.c
GNUnet/src/applications/testbed/commands.c
GNUnet/src/applications/testbed/testbed.c
GNUnet/src/transports/http.c
GNUnet/src/transports/smtp.c
GNUnet/src/util/threads/semaphoretest.c
GNUnet/src/util/threads/timertest.c
Log:
gnunet_util_sleep -> PTHREAD_SLEEP
Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/bootstrap_http/http.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -51,6 +51,8 @@
static int stat_hellodownloaded;
+static struct GE_Context * ectx;
+
/**
* Download hostlist from the web and call method
* on each hello.
@@ -201,7 +203,7 @@
sizeof(c),
&ret);
if (success == NO) {
- gnunet_util_sleep(100 * cronMILLIS);
+ PTHREAD_SLEEP(100 * cronMILLIS);
continue;
}
if (ret <= 0)
@@ -321,6 +323,7 @@
char *proxy, *proxyPort;
IPaddr ip;
+ ectx = capi->ectx;
proxy = getConfigurationString("GNUNETD",
"HTTP-PROXY");
if (proxy != NULL) {
Modified: GNUnet/src/applications/datastore/prefetch.c
===================================================================
--- GNUnet/src/applications/datastore/prefetch.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/datastore/prefetch.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -123,7 +123,7 @@
if (doneSignal != NULL)
return SYSERR;
/* the higher the load, the longer the sleep */
- gnunet_util_sleep(50 * cronMILLIS * load);
+ PTHREAD_SLEEP(50 * cronMILLIS * load);
if (doneSignal != NULL)
return SYSERR;
return OK;
@@ -146,7 +146,7 @@
if (load > 100)
load = 100; /* never sleep longer than 5 seconds since that
might show up badly in the shutdown sequence... */
- gnunet_util_sleep(50 * cronMILLIS * load);
+ PTHREAD_SLEEP(50 * cronMILLIS * load);
}
SEMAPHORE_UP(doneSignal);
return NULL;
Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -154,7 +154,7 @@
while (list->leave_request == NO) {
if (list->sock == NULL) {
- gnunet_util_sleep(500 * cronMILLIS);
+ PTHREAD_SLEEP(500 * cronMILLIS);
MUTEX_LOCK(&list->lock);
if (list->leave_request == NO)
list->sock = getClientSocket();
Modified: GNUnet/src/applications/dht/tools/dhttest2.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest2.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/dht/tools/dhttest2.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -93,7 +93,7 @@
"peer2.conf"));
daemon2 = startGNUnetDaemon(NO);
/* in case existing hellos have expired */
- gnunet_util_sleep(30 * cronSECONDS);
+ PTHREAD_SLEEP(30 * cronSECONDS);
system("cp peer1/data/hosts/* peer2/data/hosts/");
system("cp peer2/data/hosts/* peer1/data/hosts/");
if (daemon1 != -1) {
@@ -116,7 +116,7 @@
"GNUNETD-CONFIG",
"peer2.conf"));
daemon2 = startGNUnetDaemon(NO);
- gnunet_util_sleep(5 * cronSECONDS);
+ PTHREAD_SLEEP(5 * cronSECONDS);
ret = 0;
left = 5;
@@ -190,7 +190,7 @@
NULL,
NULL));
printf("Peer2 tests successful.\n");
- gnunet_util_sleep(30 * cronSECONDS);
+ PTHREAD_SLEEP(30 * cronSECONDS);
FAILURE2:
DHT_LIB_leave(&table);
destroy_blockstore_memory(store);
Modified: GNUnet/src/applications/fragmentation/fragmentationtest.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentationtest.c 2006-07-31
03:54:08 UTC (rev 3195)
+++ GNUnet/src/applications/fragmentation/fragmentationtest.c 2006-07-31
03:56:48 UTC (rev 3196)
@@ -67,7 +67,7 @@
* Wait long enough to force all fragments to timeout.
*/
static void makeTimeout() {
- gnunet_util_sleep(DEFRAGMENTATION_TIMEOUT*2);
+ PTHREAD_SLEEP(DEFRAGMENTATION_TIMEOUT*2);
defragmentationPurgeCron();
}
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -1270,7 +1270,7 @@
if ( (OK == tt(ttClosure)) &&
(rm->abortFlag == NO) &&
(rm->requestListIndex != 0) )
- gnunet_util_sleep(minSleep);
+ PTHREAD_SLEEP(minSleep);
}
if ( (rm->requestListIndex == 0) &&
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -269,7 +269,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
sock = getClientSocket();
CHECK(sock != NULL);
Modified: GNUnet/src/applications/fs/ecrs/namespacetest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -112,7 +112,7 @@
daemon = startGNUnetDaemon(NO);
GE_ASSERT(ectx, daemon > 0);
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
- gnunet_util_sleep(30 * cronSECONDS);
+ PTHREAD_SLEEP(30 * cronSECONDS);
failureCount += testNamespace();
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/ecrs/search.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -615,7 +615,7 @@
(timeout > now) &&
(ctx.aborted == NO) ) )
break;
- gnunet_util_sleep(100 * cronMILLIS);
+ PTHREAD_SLEEP(100 * cronMILLIS);
cronTime(&now);
}
for (i=0;i<ctx.queryCount;i++) {
Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -109,7 +109,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
sock = getClientSocket();
CHECK(sock != NULL);
Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -194,7 +194,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(2 * cronMINUTES));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
/* ACTUAL TEST CODE */
ctx = FSUI_start("fsuidownloadtest",
@@ -230,7 +230,7 @@
while (lastEvent != FSUI_upload_complete) {
prog++;
CHECK(prog < 1000);
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
}
SNPRINTF(keyword,
40,
@@ -247,7 +247,7 @@
while (lastEvent != FSUI_download_complete) {
prog++;
CHECK(prog < 10000);
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
if ( (suspendRestart > 0) &&
(weak_randomi(4) == 0) ) {
suspendCron();
@@ -277,7 +277,7 @@
while (lastEvent != FSUI_unindex_complete) {
prog++;
CHECK(prog < 1000);
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
CHECK(lastEvent != FSUI_unindex_error);
}
CHECK(lastEvent == FSUI_unindex_complete);
Modified: GNUnet/src/applications/fs/fsui/fsuitest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/fsui/fsuitest.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -127,7 +127,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(2 * cronMINUTES));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
/* ACTUAL TEST CODE */
ctx = FSUI_start("fsuitest",
@@ -158,7 +158,7 @@
prog++;
CHECK(prog < 10000)
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
}
SNPRINTF(keyword,
40,
@@ -174,7 +174,7 @@
while (lastEvent != FSUI_download_complete) {
prog++;
CHECK(prog < 10000);
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
}
FSUI_stopSearch(ctx,
uri);
Modified: GNUnet/src/applications/fs/fsui/fsuitest2.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest2.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/fsui/fsuitest2.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -67,7 +67,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
/* ACTUAL TEST CODE */
ctx = FSUI_start("fsuitest2",
Modified: GNUnet/src/applications/fs/fsui/namespace_infotest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_infotest.c 2006-07-31
03:54:08 UTC (rev 3195)
+++ GNUnet/src/applications/fs/fsui/namespace_infotest.c 2006-07-31
03:56:48 UTC (rev 3196)
@@ -78,7 +78,7 @@
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(2 * cronMINUTES));
ECRS_deleteNamespace("test");
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
/* ACTUAL TEST CODE */
ctx = FSUI_start("namespace_infotest",
Modified: GNUnet/src/applications/fs/fsui/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/searchtest.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/fs/fsui/searchtest.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -127,7 +127,7 @@
ok = YES;
startCron();
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
/* ACTUAL TEST CODE */
@@ -175,14 +175,14 @@
prog++;
CHECK(prog < 10000)
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
}
prog = 0;
while (lastEvent != FSUI_download_complete) {
prog++;
CHECK(prog < 10000);
- gnunet_util_sleep(50 * cronMILLIS);
+ PTHREAD_SLEEP(50 * cronMILLIS);
}
FSUI_stopSearch(ctx,
uri);
Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/lib/fslib.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -130,7 +130,7 @@
"FSLIB: error communicating with gnunetd; sleeping for %ums\n",
delay);
#endif
- gnunet_util_sleep(delay);
+ PTHREAD_SLEEP(delay);
delay *= 2;
if (delay > 5 * cronSECONDS)
delay = 5 * cronSECONDS;
Modified: GNUnet/src/applications/fs/lib/fslibtest.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslibtest.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/fs/lib/fslibtest.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -236,7 +236,7 @@
startCron();
MUTEX_CREATE(&lock);
GE_ASSERT(ectx, OK == waitForGNUnetDaemonRunning(60 * cronSECONDS));
- gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
+ PTHREAD_SLEEP(5 * cronSECONDS); /* give apps time to start */
sock = getClientSocket();
CHECK(sock != NULL);
ctx = FS_SEARCH_makeContext(&lock);
@@ -341,7 +341,7 @@
&countCallback,
&i);
CHECK(hnd != NULL);
- gnunet_util_sleep(10 * cronSECONDS);
+ PTHREAD_SLEEP(10 * cronSECONDS);
FS_stop_search(ctx, hnd);
CHECK(i <= 0);
Modified: GNUnet/src/applications/rpc/rpc.c
===================================================================
--- GNUnet/src/applications/rpc/rpc.c 2006-07-31 03:54:08 UTC (rev 3195)
+++ GNUnet/src/applications/rpc/rpc.c 2006-07-31 03:56:48 UTC (rev 3196)
@@ -1556,7 +1556,7 @@
ret = SYSERR;
}
RPC_paramFree(rets);
- gnunet_util_sleep(1 * cronSECONDS);
+ PTHREAD_SLEEP(1 * cronSECONDS);
if (RPC_ERROR_OK != rpcAPI->RPC_stop(record))
GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
_("async RPC reply not received.\n"));
Modified: GNUnet/src/applications/session/sessiontest.c
===================================================================
--- GNUnet/src/applications/session/sessiontest.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/session/sessiontest.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -83,7 +83,7 @@
"peer2.conf"));
daemon2 = startGNUnetDaemon(NO);
/* in case existing hellos have expired */
- gnunet_util_sleep(30 * cronSECONDS);
+ PTHREAD_SLEEP(30 * cronSECONDS);
system("cp peer1/data/hosts/* peer2/data/hosts/");
system("cp peer2/data/hosts/* peer1/data/hosts/");
if (daemon1 != -1) {
@@ -106,7 +106,7 @@
"GNUNETD-CONFIG",
"peer2.conf"));
daemon2 = startGNUnetDaemon(NO);
- gnunet_util_sleep(5 * cronSECONDS);
+ PTHREAD_SLEEP(5 * cronSECONDS);
ret = 0;
Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/tbench/tbench.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -336,9 +336,9 @@
(timeoutOccured == NO) ) {
if (delayStart + delay - now > 5 * cronMILLIS) {
pollResults(&results[iteration], NO);
- gnunet_util_sleep(5 * cronMILLIS);
+ PTHREAD_SLEEP(5 * cronMILLIS);
} else
- gnunet_util_sleep(delayStart + delay - now);
+ PTHREAD_SLEEP(delayStart + delay - now);
}
}
if ( (0 == pollResults(&results[iteration], NO)) &&
@@ -350,7 +350,7 @@
if ( (0 == pollResults(&results[iteration], YES) ) &&
(earlyEnd == 0) )
earlyEnd = now;
- gnunet_util_sleep(5 * cronMILLIS);
+ PTHREAD_SLEEP(5 * cronMILLIS);
}
/* make sure to unblock waiting jobs */
Modified: GNUnet/src/applications/tbench/tbenchtest.c
===================================================================
--- GNUnet/src/applications/tbench/tbenchtest.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/tbench/tbenchtest.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -187,7 +187,7 @@
"GNUNETD-CONFIG",
"peer2.conf"));
daemon2 = startGNUnetDaemon(NO);
- gnunet_util_sleep(5 * cronSECONDS);
+ PTHREAD_SLEEP(5 * cronSECONDS);
sleep(5);
ret = 0;
Modified: GNUnet/src/applications/tbench/tbenchtest_udp.c
===================================================================
--- GNUnet/src/applications/tbench/tbenchtest_udp.c 2006-07-31 03:54:08 UTC
(rev 3195)
+++ GNUnet/src/applications/tbench/tbenchtest_udp.c 2006-07-31 03:56:48 UTC
(rev 3196)
@@ -189,7 +189,7 @@
"GNUNETD-CONFIG",
"peer2udp.conf"));
daemon2 = startGNUnetDaemon(NO);
- gnunet_util_sleep(5 * cronSECONDS);
+ PTHREAD_SLEEP(5 * cronSECONDS);
sleep(5);
ret = 0;
Modified: GNUnet/src/applications/testbed/commands.c
===================================================================
--- GNUnet/src/applications/testbed/commands.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/testbed/commands.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -381,7 +381,7 @@
if (ret == OK)
break;
rtc++;
- gnunet_util_sleep(cronSECONDS);
+ PTHREAD_SLEEP(cronSECONDS);
}
if (ret == SYSERR) {
XPRINTF(" could not connect to %s:%d.\n",
@@ -1651,7 +1651,7 @@
sizeof(c),
&ret);
if ( success == NO ) {
- gnunet_util_sleep(100 * cronMILLIS);
+ PTHREAD_SLEEP(100 * cronMILLIS);
continue;
}
if ( (ret == 0) || (ret == (size_t)-1) )
@@ -1685,7 +1685,7 @@
65536-curpos,
&ret);
if ( success == NO ) {
- gnunet_util_sleep(20);
+ PTHREAD_SLEEP(20);
continue;
}
if ( (ret == 0) || (ret == (size_t)-1) )
Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/applications/testbed/testbed.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -1253,7 +1253,7 @@
sizeof(c),
&ret);
if ( success == NO ) {
- gnunet_util_sleep(100 * cronMILLIS);
+ PTHREAD_SLEEP(100 * cronMILLIS);
continue;
}
if ( (ret == 0) || (ret == (size_t) -1) )
@@ -1301,7 +1301,7 @@
semaphores... */
while (pding > 0) {
pding = 0;
- gnunet_util_sleep(50);
+ PTHREAD_SLEEP(50);
MUTEX_LOCK(&lock);
for (i=ptSize-1;i>=0;i--) {
if (pt[i]->client == client) {
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2006-07-31 03:54:08 UTC (rev 3195)
+++ GNUnet/src/transports/http.c 2006-07-31 03:56:48 UTC (rev 3196)
@@ -872,7 +872,7 @@
/* this should only happen under Win9x because
of a bug in the socket implementation (KB177346).
Let's sleep and try again. */
- gnunet_util_sleep(20);
+ PTHREAD_SLEEP(20);
goto try_again_1;
}
if (stats != NULL)
Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c 2006-07-31 03:54:08 UTC (rev 3195)
+++ GNUnet/src/transports/smtp.c 2006-07-31 03:56:48 UTC (rev 3196)
@@ -354,7 +354,7 @@
MAX_SMTP_LINE - pos,
&i);
if (success == NO) {
- gnunet_util_sleep(20);
+ PTHREAD_SLEEP(20);
goto try_again;
}
@@ -450,7 +450,7 @@
fd = fileopen(pipename, O_RDONLY);
if (fd == -1) {
if (smtp_shutdown == NO)
- gnunet_util_sleep(5 * cronSECONDS);
+ PTHREAD_SLEEP(5 * cronSECONDS);
continue;
}
fdes = fdopen(fd, "r");
Modified: GNUnet/src/util/threads/semaphoretest.c
===================================================================
--- GNUnet/src/util/threads/semaphoretest.c 2006-07-31 03:54:08 UTC (rev
3195)
+++ GNUnet/src/util/threads/semaphoretest.c 2006-07-31 03:56:48 UTC (rev
3196)
@@ -41,7 +41,7 @@
sv = 0;
fprintf(stderr, ".");
while (sv == 0)
- gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work */
+ PTHREAD_SLEEP(50 * cronMILLIS); /* busy waiting may not always work */
MUTEX_LOCK(&lock);
sv = 1;
MUTEX_UNLOCK(&lock);
@@ -72,7 +72,7 @@
PTHREAD_DETACH(&pt);
while (tv != 2) {
sv = 1;
- gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work */
+ PTHREAD_SLEEP(50 * cronMILLIS); /* busy waiting may not always work */
}
MUTEX_DESTROY(&lock);
PTHREAD_CREATE(&pt,
@@ -95,7 +95,7 @@
NULL,
1024);
while (sv == 1)
- gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work */
+ PTHREAD_SLEEP(50 * cronMILLIS); /* busy waiting may not always work */
MUTEX_LOCK(&lock);
sv = 5; /* release lockIt from while sv==0 loop,
blocks it on lock */
@@ -104,7 +104,7 @@
if (sv != 5) {
MUTEX_UNLOCK(&lock);
while (tv != 2)
- gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work
*/
+ PTHREAD_SLEEP(50 * cronMILLIS); /* busy waiting may not always work */
MUTEX_DESTROY(&lock);
printf("MUTEX test failed at %s:%u\n",
__FILE__, __LINE__);
@@ -112,7 +112,7 @@
} else {
MUTEX_UNLOCK(&lock);
while (tv != 2)
- gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work
*/
+ PTHREAD_SLEEP(50 * cronMILLIS); /* busy waiting may not always work */
PTHREAD_JOIN(&pt, &unused);
MUTEX_DESTROY(&lock);
return 0; /* ok */
Modified: GNUnet/src/util/threads/timertest.c
===================================================================
--- GNUnet/src/util/threads/timertest.c 2006-07-31 03:54:08 UTC (rev 3195)
+++ GNUnet/src/util/threads/timertest.c 2006-07-31 03:56:48 UTC (rev 3196)
@@ -46,7 +46,7 @@
#define MAXV 1500
for (i=0;i<MAXV;i+=INCR) {
cronTime(&last);
- if (0 != gnunet_util_sleep(cronMILLIS * i))
+ if (0 != PTHREAD_SLEEP(cronMILLIS * i))
return 5;
cronTime(&now);
#if VERBOSE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3196 - in GNUnet/src: applications/bootstrap_http applications/datastore applications/dht/tools applications/fragmentation applications/fs/ecrs applications/fs/fsui applications/fs/lib applications/rpc applications/session applications/tbench applications/testbed transports util/threads,
grothoff <=