/* See the end of this file for copyright and license terms. */

#include <gay/irq.h>
#include <gay/sched.h>

/**
 * @brief Main kernel entry point.
 *
 * This is the first truly architecture independent code that will be executed.
 * It bootstraps the entire kernel core and drivers, and when done, spawns the
 * init daemon.
 * The arguments passed to this function are the kernel command line,
 * as obtained by the bootloader.
 *
 * (that is, when it's finished at some point lmao)
 */
int main(int argc, char *argv[])
{
	int err;

	irq_init();

	err = sched_init();
	if (err)
		return err;

	return 0;
}

/*
 * This file is part of GayBSD.
 * Copyright (c) 2021 fef <owo@fef.moe>.
 *
 * GayBSD is nonviolent software: you may only use, redistribute, and/or
 * modify it under the terms of the Cooperative Nonviolent Public License
 * (CNPL) as found in the LICENSE file in the source code root directory
 * or at <https://git.pixie.town/thufie/npl-builder>; either version 7
 * of the license, or (at your option) any later version.
 *
 * GayBSD comes with ABSOLUTELY NO WARRANTY, to the extent
 * permitted by applicable law.  See the CNPL for details.
 */