xref: /onnv-gate/usr/src/cmd/filebench/common/procflow.h (revision 6212:d9dcad6dd79c)
15184Sek110237 /*
25184Sek110237  * CDDL HEADER START
35184Sek110237  *
45184Sek110237  * The contents of this file are subject to the terms of the
55184Sek110237  * Common Development and Distribution License (the "License").
65184Sek110237  * You may not use this file except in compliance with the License.
75184Sek110237  *
85184Sek110237  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95184Sek110237  * or http://www.opensolaris.org/os/licensing.
105184Sek110237  * See the License for the specific language governing permissions
115184Sek110237  * and limitations under the License.
125184Sek110237  *
135184Sek110237  * When distributing Covered Code, include this CDDL HEADER in each
145184Sek110237  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155184Sek110237  * If applicable, add the following below this CDDL HEADER, with the
165184Sek110237  * fields enclosed by brackets "[]" replaced with your own identifying
175184Sek110237  * information: Portions Copyright [yyyy] [name of copyright owner]
185184Sek110237  *
195184Sek110237  * CDDL HEADER END
205184Sek110237  */
215184Sek110237 /*
22*6212Saw148015  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
235184Sek110237  * Use is subject to license terms.
245184Sek110237  */
255184Sek110237 
265184Sek110237 #ifndef _FB_PROCFLOW_H
275184Sek110237 #define	_FB_PROCFLOW_H
285184Sek110237 
295184Sek110237 #pragma ident	"%Z%%M%	%I%	%E% SMI"
305184Sek110237 
315184Sek110237 #include "config.h"
325184Sek110237 
335184Sek110237 #include "vars.h"
345184Sek110237 #include "stats.h"
355184Sek110237 
365184Sek110237 #ifdef	__cplusplus
375184Sek110237 extern "C" {
385184Sek110237 #endif
395184Sek110237 
405184Sek110237 typedef struct procflow {
415184Sek110237 	char		pf_name[128];
425184Sek110237 	int		pf_instance;
43*6212Saw148015 	avd_t		pf_instances;
445184Sek110237 	int		pf_running;
455184Sek110237 	struct procflow	*pf_next;
465184Sek110237 	pid_t		pf_pid;
475184Sek110237 	pthread_t	pf_tid;
485184Sek110237 	struct threadflow *pf_threads;
495184Sek110237 	int		pf_attrs;
50*6212Saw148015 	avd_t		pf_nice;
515184Sek110237 	flowstat_t	pf_stats;
525184Sek110237 } procflow_t;
535184Sek110237 
54*6212Saw148015 procflow_t *procflow_define(char *name, procflow_t *inherit, avd_t instances);
555184Sek110237 int	procflow_init(void);
565184Sek110237 void	procflow_shutdown(void);
575184Sek110237 int	procflow_exec(char *name, int instance);
585184Sek110237 void	procflow_usage(void);
595184Sek110237 int	procflow_allstarted(void);
605184Sek110237 
615184Sek110237 #ifdef	__cplusplus
625184Sek110237 }
635184Sek110237 #endif
645184Sek110237 
655184Sek110237 #endif	/* _FB_PROCFLOW_H */
66