/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* The "program" executed by the injector consists of a tree of commands.
* Routines in this file build and execute said command tree.
*/
#include <unistd.h>
#include <inj.h>
#include <inj_event.h>
#include <inj_lex.h>
#include <inj_err.h>
/*
* Command tree construction
*/
void
{
}
inj_cmds_get(void)
{
return (&inj_cmds);
}
{
return (re);
}
{
return (new);
}
{
inj_randelem_t *r;
int nelems, i;
prob = 0;
if (prob != 100) {
yyerror("probabilities don't sum to 100\n");
return (NULL);
}
nelems = i;
prob = 0;
}
return (cmd);
}
{
return (cmd);
}
{
return (cmd);
}
{
return (cmd);
}
{
return (cmd);
}
inj_cmd_endhrt(void)
{
}
static uint64_t
inj_ena(void)
{
return (((gethrtime() & ENA_FMT1_TIME_MASK) <<
}
static void
{
if (!quiet) {
}
1)) != 0)
if (verbose) {
(void) printf("\n");
}
if (!quiet)
(void) printf("done\n");
}
static void
{
int i;
break;
}
}
static void
{
case CMD_SEND_EVENT:
break;
case CMD_SLEEP:
(void) printf("sleeping for %d sec%s ... ",
(void) printf("done\n");
break;
case CMD_RANDOM:
break;
default:
}
}
void
{
int i;
if (verbose) {
(void) printf("(repeat %d of %d)\n",
}
}
} else
}
}