1 /* Type definitions used in RS.
6 /* Definition of an entry of the boot image priv table. */
7 struct boot_image_priv
{
8 endpoint_t endpoint
; /* process endpoint number */
9 char label
[RS_MAX_LABEL_LEN
]; /* label to assign to this service */
11 int flags
; /* privilege flags */
12 short trap_mask
; /* allowed system call traps */
13 int ipc_to
; /* send mask protection */
14 int *k_calls
; /* allowed kernel calls */
15 int *vm_calls
; /* allowed vm calls */
18 /* Definition of an entry of the boot image sys table. */
19 struct boot_image_sys
{
20 endpoint_t endpoint
; /* process endpoint number */
22 int flags
; /* system flags */
25 /* Definition of an entry of the boot image dev table. */
26 struct boot_image_dev
{
27 endpoint_t endpoint
; /* process endpoint number */
29 dev_t dev_nr
; /* major device number */
30 int dev_style
; /* device style */
31 long period
; /* heartbeat period (or zero) */
34 /* Definition of an entry of the system process table. */
36 struct rprocpub
*r_pub
; /* pointer to the corresponding public entry */
37 pid_t r_pid
; /* process id, -1 if the process is not there */
39 int r_restarts
; /* number of restarts (initially zero) */
40 long r_backoff
; /* number of periods to wait before revive */
41 unsigned r_flags
; /* status and policy flags */
43 clock_t r_check_tm
; /* timestamp of last check */
44 clock_t r_alive_tm
; /* timestamp of last heartbeat */
45 clock_t r_stop_tm
; /* timestamp of SIGTERM signal */
46 endpoint_t r_caller
; /* RS_LATEREPLY caller */
48 char r_cmd
[MAX_COMMAND_LEN
]; /* raw command plus arguments */
49 char r_script
[MAX_SCRIPT_LEN
]; /* name of the restart script executable */
50 char *r_argv
[MAX_NR_ARGS
+2]; /* parsed arguments vector */
51 int r_argc
; /* number of arguments */
53 char *r_exec
; /* Executable image */
54 size_t r_exec_len
; /* Length of image */
56 int r_set_resources
; /* set when resources must be set. */
57 struct priv r_priv
; /* Privilege structure to be passed to the
63 u32_t r_call_mask
[RS_SYS_CALL_MASK_SIZE
];
64 char r_ipc_list
[MAX_IPC_LIST
];
66 char r_control
[RS_NR_CONTROL
][RS_MAX_LABEL_LEN
];
69 /* Definition of the global update descriptor. */
71 int flags
; /* flags to keep track of the status of the update */
72 clock_t prepare_tm
; /* timestamp of when the update was scheduled */
73 clock_t prepare_maxtime
; /* max time to wait for the process to be ready */
74 struct rproc
*rp
; /* the process under update */
77 #endif /* RS_TYPE_H */