rwlock_test.c revision a134177ed9f82189504191d90f3ed9e97c2b47cb
/*
* Copyright (C) 1998-2001, 2004, 2005, 2007, 2013, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: rwlock_test.c,v 1.26 2007/06/19 23:46:59 tbox Exp $ */
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef WIN32
#endif
#ifdef ISC_PLATFORM_USETHREADS
static isc_threadresult_t
#ifdef WIN32
#endif
sleep(1);
sleep(1);
sleep(1);
return ((isc_threadresult_t)0);
}
static isc_threadresult_t
#ifdef WIN32
#endif
sleep(1);
sleep(1);
sleep(1);
return ((isc_threadresult_t)0);
}
int
unsigned int nworkers;
unsigned int i;
char name[100];
void *dupname;
if (argc > 1)
else
nworkers = 2;
if (nworkers > 100)
nworkers = 100;
for (i = 0; i < nworkers; i++) {
if (i != 0 && i % 3 == 0)
&workers[i]) ==
else
&workers[i]) ==
}
for (i = 0; i < nworkers; i++)
return (0);
}
#else
int
return(1);
}
#endif