task_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 1998-2001, 2004, 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: task_test.c,v 1.51 2007/06/19 23:46:59 tbox Exp $ */
#include <config.h>
#include <stdlib.h>
#include <unistd.h>
static void
int i, j;
j = 0;
for (i = 0; i < 1000000; i++)
j += 100;
}
static void
}
static void
}
static char one[] = "1";
static char two[] = "2";
static char three[] = "3";
static char four[] = "4";
static char foo[] = "foo";
static char bar[] = "bar";
int
unsigned int workers;
struct isc_interval interval;
if (argc > 1) {
if (workers < 1)
workers = 1;
if (workers > 8192)
workers = 8192;
} else
workers = 2;
#ifndef WIN32
sleep(2);
#else
Sleep(2000);
#endif
/*
* Note: (void *)1 is used as a sender here, since some compilers
* don't like casting a function pointer to a (void *).
*
* In a real use, it is more likely the sender would be a
* structure (socket, timer, task, etc) but this is just a test
* program.
*/
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
sizeof(*event));
NULL,
#ifndef WIN32
sleep(10);
#else
Sleep(10000);
#endif
printf("destroy\n");
printf("destroyed\n");
return (0);
}