event.h 1.36 KB
Newer Older
1 2
/*
 * EMULAB-COPYRIGHT
Mike Hibler's avatar
Mike Hibler committed
3
 * Copyright (c) 2002, 2003 University of Utah and the Flux Group.
4 5 6
 * All rights reserved.
 */

Mike Hibler's avatar
Mike Hibler committed
7 8
#define STRSIZE		64

9 10 11 12 13 14 15 16
/*
 * Event defs
 */
typedef struct {
	int type;
	union {
		struct {
			int startdelay;	/* range in sec of start interval */
Mike Hibler's avatar
Mike Hibler committed
17
			int startat;	/* start time (alt to startdelay) */
18 19 20
			int pkttimeout;	/* packet timeout in usec */
			int idletimer;	/* idle timer in pkt timeouts */
			int chunkbufs;  /* max receive buffers */
Mike Hibler's avatar
Mike Hibler committed
21 22
			int writebufmem;/* max disk write buffer memory */
			int maxmem;	/* max total memory */
23 24 25 26 27 28 29 30
			int readahead;  /* max readahead in packets */
			int inprogress; /* max packets in progress */
			int redodelay;	/* redo delay in usec */
			int idledelay;	/* writer idle delay in usec */
			int slice;	/* disk slice to write */
			int zerofill;	/* non-0 to zero fill free space */
			int randomize;	/* non-0 to randomize request list */
			int nothreads;	/* non-0 to single thread unzip */
31
			int dostype;	/* DOS partition type to set */
32 33
			int debug;	/* debug level */
			int trace;	/* tracing level */
Mike Hibler's avatar
Mike Hibler committed
34 35
			char traceprefix[STRSIZE];
					/* prefix for trace output file */
36 37 38 39 40 41 42 43 44 45 46 47 48 49
		} start;
		struct {
			int exitstatus;
		} stop;
	} data;
} Event_t;

#define EV_ANY		0
#define EV_START	1
#define EV_STOP		2

extern int EventInit(char *server);
extern int EventCheck(Event_t *event);
extern void EventWait(int eventtype, Event_t *event);