1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 /*
9  * $Header: /src/master/dx/src/exec/dpexec/status.h,v 1.6 2004/06/09 16:14:28 davidt Exp $
10  */
11 
12 #include <dxconfig.h>
13 
14 #ifndef	_STATUS_H
15 #define	_STATUS_H
16 
17 #include "config.h"
18 
19 #if defined(__cplusplus) || defined(c_plusplus)
20 extern "C" {
21 #endif
22 
23 #if DXD_PROCESSOR_STATUS
24 
25 #define PS_MIN		0		/* this must be first and 0 */
26 #define	PS_NONE		1
27 #define	PS_EXECUTIVE	2
28 #define PS_PARSE	3
29 #define PS_GRAPHGEN	4
30 #define PS_GRAPHQUEUE	5
31 #define PS_RUN		6
32 #define	PS_RECLAIM	7
33 #define PS_JOINWAIT	8
34 #define	PS_NAPPING	9
35 #define	PS_DEAD		10
36 #define	PS_MAX		11		/* this must be last */
37 
38 extern int _dxd_exStatusPID; /* from status.c */
39 extern int *_dxd_exProcessorStatus;
40 
41 Error _dxf_ExInitStatus	(int n, int flag);
42 void _dxf_ExCleanupStatus	(void);
43 
44 #define	set_status(_s)	if (_dxd_exProcessorStatus) _dxd_exProcessorStatus[_dxd_exMyPID] = (_s)
45 #define	get_status() \
46 		(_dxd_exProcessorStatus ? _dxd_exProcessorStatus[_dxd_exMyPID] : PS_NONE)
47 #else
48 #define	set_status(_s)   FALSE
49 #define	get_status()     FALSE
50 #endif
51 
52 #if defined(__cplusplus) || defined(c_plusplus)
53 }
54 #endif
55 
56 #endif	/* _STATUS_H */
57