rwlock_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 1998-2001, 2004, 2005, 2007, 2013, 2016 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