xref: /titanic_41/usr/src/cmd/fm/modules/common/eversholt/eval.h (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * eval.h -- public definitions for eval module
27  *
28  */
29 
30 #ifndef	_EFT_EVAL_H
31 #define	_EFT_EVAL_H
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 struct evalue {
40 	enum datatype {
41 		UNDEFINED = 0,
42 		UINT64,		/* use for Boolean as well */
43 		STRING,		/* usually pointer from stable() */
44 		NODEPTR		/* (struct node *) */
45 	} t;
46 	/*
47 	 * using v to handle all values eliminates the need for switch()
48 	 * blocks during assignments, comparisons and other operations
49 	 */
50 	unsigned long long v;
51 };
52 
53 int eval_potential(struct node *np, struct lut *ex, struct node *epnames[],
54     struct node **newc);
55 int eval_expr(struct node *np, struct lut *ex, struct node *epnames[],
56 	struct lut **globals, struct config *croot, struct arrow *arrowp,
57 	int try, struct evalue *valuep);
58 struct node *eval_fru(struct node *np);
59 struct node *eval_asru(struct node *np);
60 
61 #ifdef	__cplusplus
62 }
63 #endif
64 
65 #endif	/* _EFT_EVAL_H */
66