/* Copyright 1984 by the Massachusetts Institute of Technology */

/* Here is where the system initialization is done. The routines specified
 * in INITTBL are called in order. The routines for application initialization
 * can be put after the system initialization routines.
 */

#include	<types.h>
#include	<sys.h>
#include	<sysext.h>
#include	<params.h>

ext	struct inittbl	INITTBL[];
 
main()
{
	reg struct inittbl *init;
	
	disable();
	init = INITTBL;
/*	printf("SYSINIT:\n"); */
	mem_init();
	syshnd = (hndlre *)init_tsk(SYSTSKS);
	while (init->init_routine) {
		(*init->init_routine)(init->init_data);
		init++;
	}
	enable(MD_INTEN);
	run_tsk(syshnd);
	bughalt("SYSINIT: Returned from run_tsk.\n");
}
