File: vproc-state.h

package info (click to toggle)
smlnj-runtime 110.44-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,968 kB
  • ctags: 5,368
  • sloc: ansic: 24,674; asm: 4,195; makefile: 1,353; sh: 91
file content (65 lines) | stat: -rw-r--r-- 2,016 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* vproc-state.h
 *
 * COPYRIGHT (c) 1992 by AT&T Bell Laboratories.
 *
 * This is the state of a virtual processor.
 */

#ifndef _VPROC_STATE_
#define _VPROC_STATE_

#ifndef _ML_BASE_
#include "ml-base.h"
#endif

#ifndef _ML_SIGNALS_
#include "ml-signals.h"
#endif

#ifndef _SYSTEM_SIGNALS_
#include "system-signals.h"
#endif

#ifndef _ML_TIMER_
#include "ml-timer.h"
#endif

#if defined(MP_SUPPORT) && (! defined(_ML_MP_))
#include "ml-mp.h"
#endif


/** The Virtual processor state vector **/
struct vproc_state {
    heap_t	*vp_heap;	    /* The heap for this ML task */
    ml_state_t	*vp_state;	    /* The state of the ML task that is */
				    /* running on this VProc.  Eventually */
				    /* we will support multiple ML tasks */
				    /* per VProc. */
				    /* Signal related fields: */
    bool_t	vp_inMLFlag;		/* True while executing ML code */
    bool_t	vp_handlerPending;	/* Is there a signal handler pending? */
    bool_t	vp_inSigHandler;	/* Is an ML signal handler active? */
    int		vp_numPendingSysSigs;	/* number of pending system signals */
    int		vp_numPendingSigs;	/* number of pending runtime system */
					/* signals */
    int		vp_sigCode;		/* the code and count of the next */
    int		vp_sigCount;		/* signal to handle. */
    pending_sig_t vp_pendingSigQ[NUM_SIGS]; /* the queue of pending signals. */
    int		vp_nextPendingSig;	/* the index in the queue of the next */
					/* signal to handle. */
    int		vp_numInQ;		/* the number of pending signals in */
					/* the queue. */
    int		vp_gcSigState;		/* The state of the GC signal handler */
    Time_t	*vp_gcTime0;	    /* The cumulative CPU time at the start of */
				    /* the last GC (see kernel/timers.c). */
    Time_t	*vp_gcTime;	    /* The cumulative GC time. */
    Unsigned32_t vp_limitPtrMask;   /* for raw-C-call interface */
#ifdef MP_SUPPORT
    mp_pid_t	vp_mpSelf;	    /* the owning process's ID */
    vproc_status_t vp_mpState;	    /* proc state (see ml-mp.h) */
#endif
};

#endif /* !_VPROC_STATE_ */