import / small alignment of many arm includes
[minix3.git] / servers / rs / type.h
blobdcc21a6cbc3534e8ab483c8ee20fdeb5c7057d9b
1 /* Type definitions used in RS.
2 */
3 #ifndef RS_TYPE_H
4 #define RS_TYPE_H
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 */
14 /* Definition of an entry of the boot image sys table. */
15 struct boot_image_sys {
16 endpoint_t endpoint; /* process endpoint number */
18 int flags; /* system flags */
21 /* Definition of an entry of the boot image dev table. */
22 struct boot_image_dev {
23 endpoint_t endpoint; /* process endpoint number */
25 dev_t dev_nr; /* major device number */
28 /* Definition of an entry of the system process table. */
29 struct rproc {
30 struct rprocpub *r_pub; /* pointer to the corresponding public entry */
31 struct rproc *r_old_rp; /* pointer to the slot with the old version */
32 struct rproc *r_new_rp; /* pointer to the slot with the new version */
33 struct rproc *r_prev_rp; /* pointer to the slot with the prev replica */
34 struct rproc *r_next_rp; /* pointer to the slot with the next replica */
35 pid_t r_pid; /* process id, -1 if the process is not there */
37 int r_restarts; /* number of restarts (initially zero) */
38 long r_backoff; /* number of periods to wait before revive */
39 unsigned r_flags; /* status and policy flags */
41 long r_period; /* heartbeat period (or zero) */
42 clock_t r_check_tm; /* timestamp of last check */
43 clock_t r_alive_tm; /* timestamp of last heartbeat */
44 clock_t r_stop_tm; /* timestamp of SIGTERM signal */
45 endpoint_t r_caller; /* RS_LATEREPLY caller */
46 int r_caller_request; /* RS_LATEREPLY caller request */
48 char r_cmd[MAX_COMMAND_LEN]; /* raw command plus arguments */
49 char r_args[MAX_COMMAND_LEN]; /* null-separated raw command plus arguments */
50 #define ARGV_ELEMENTS (MAX_NR_ARGS+2) /* path, args, null */
51 char *r_argv[ARGV_ELEMENTS];
52 int r_argc; /* number of arguments */
53 char r_script[MAX_SCRIPT_LEN]; /* name of the restart script executable */
55 char *r_exec; /* Executable image */
56 size_t r_exec_len; /* Length of image */
58 struct priv r_priv; /* Privilege structure to be passed to the
59 * kernel.
61 uid_t r_uid;
62 endpoint_t r_scheduler; /* scheduler */
63 int r_priority; /* negative values are reserved for special meanings */
64 int r_quantum;
65 int r_cpu;
67 /* Backup values from the privilege structure. */
68 struct io_range r_io_tab[NR_IO_RANGE];
69 int r_nr_io_range;
70 int r_irq_tab[NR_IRQ];
71 int r_nr_irq;
73 char r_ipc_list[MAX_IPC_LIST];
74 int r_nr_control;
75 char r_control[RS_NR_CONTROL][RS_MAX_LABEL_LEN];
78 /* Definition of the global update descriptor. */
79 struct rupdate {
80 int flags; /* flags to keep track of the status of the update */
81 clock_t prepare_tm; /* timestamp of when the update was scheduled */
82 clock_t prepare_maxtime; /* max time to wait for the process to be ready */
83 struct rproc *rp; /* the process under update */
86 #endif /* RS_TYPE_H */