X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftap%2Ftap.c;h=7c01e140d5c206c475957f439b47eb3462fff994;hp=b7a84ac9900b398a40687e4e2fedd2bef3049518;hb=532feb88f516f0848ae0e3eaf3a89a1fc94db6c4;hpb=f4eb3a18caf946ee6cc2cb57e2a0c6a6f115157f diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index b7a84ac9..7c01e140 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -45,8 +45,13 @@ static int test_died = 0; static int test_pid; /* Encapsulate the pthread code in a conditional. In the absence of - libpthread the code does nothing */ -#if HAVE_LIBPTHREAD + libpthread the code does nothing. + + If you have multiple threads calling ok() etc. at the same time you would + need this, but in that case your test numbers will be random and I'm not + sure it makes sense. --RR +*/ +#ifdef WANT_PTHREAD #include static pthread_mutex_t M = PTHREAD_MUTEX_INITIALIZER; # define LOCK pthread_mutex_lock(&M)