/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "terror.h"
#ifndef N_PROC
#endif
/* all threads wait until this is == N_PROC */
/* Count is the shared resource updated by different threads. */
static unsigned int *Count;
{
int k, r;
asorelax(1);
for(k = 0; k < N_STEP; ++k)
for(r = 0; r < N_REP; ++r)
}
tmain()
{
ssize_t k;
int status;
int zerof;
int type;
char *lockid;
taso(0);
tchild();
/* get shared memory */
terror("mmap failed");
meth = 0;
{
continue;
{
continue;
}
*Lock = 0;
*Count = 0;
*Active = 0;
#if N_PROC > 1
for(k = 0; k < N_PROC; ++k)
terror("Can't create a child process");
else if(pid > 0) /* parent process */
continue;
}
else /* child process */
texit(0);
}
terror("workload subprocess error");
#else
#endif
if(*Lock != 0)
}
}
texit(0);
}