/* Data about the different processes. */
#define PROCESS_MAX 16 /* Must match the space in kernel/mpx.x */
-#define KERNEL 0 /* The first process is the kernel. */
+#define KERNEL_IDX 0 /* The first process is the kernel. */
#define FS 2 /* The third must be fs. */
struct process { /* Per-process memory adresses. */
/* Patch text and data sizes of the processes into kernel data space.
*/
- doff= process[KERNEL].data + P_SIZ_OFF;
+ doff= process[KERNEL_IDX].data + P_SIZ_OFF;
for (i= 0; i < n_procs; i++) {
procp= &process[i];
}
/* Get the click shift from the kernel text segment. */
- if (i == KERNEL) {
+ if (i == KERNEL_IDX) {
if (!get_clickshift(vsec, &hdr)) return;
addr= align(addr, click_size);
}
if (!get_segment(&vsec, &a_data, &addr, limit)) return;
/* Make space for bss and stack unless... */
- if (i != KERNEL && (k_flags & K_CLAIM)) a_bss= a_stack= 0;
+ if (i != KERNEL_IDX && (k_flags & K_CLAIM)) a_bss= a_stack= 0;
printf("%07lx %07lx %8ld %8ld %8ld",
procp->cs, procp->ds,
}
/* Check the kernel magic number. */
- if (get_word(process[KERNEL].data + MAGIC_OFF) != KERNEL_D_MAGIC) {
+ if (get_word(process[KERNEL_IDX].data + MAGIC_OFF) != KERNEL_D_MAGIC) {
printf("Kernel magic number is incorrect\n");
errno= 0;
return;
(void) dev_close();
/* Minix. */
- minix(process[KERNEL].entry, process[KERNEL].cs,
- process[KERNEL].ds, params, sizeof(params), aout);
+ minix(process[KERNEL_IDX].entry, process[KERNEL_IDX].cs,
+ process[KERNEL_IDX].ds, params, sizeof(params), aout);
if (!(k_flags & K_BRET)) {
extern u32_t reboot_code;