<commit_before>/*
 * File main.c
 * Author: <NAME> <<EMAIL>>
 *
 * Description: setup the operating system (mostly non arch-dependent) and 
 *   spawn the first process (init)
 */
#include <kernel/pyr0.h>
#include <kernel/console.h>
#include <kernel/mm.h>
#include <kernel/kmalloc.h>
#include <kernel/mman.h>
#include <kernel/serial.h>
#include <kernel/tty.h>
#include <kernel/cpuinfo.h>
#include <kernel/cmdline.h>

#include <asm/system.h>
#include <asm/pgtable.h>

#include "../boot/multiboot.h"

extmodule_t boot_module;

void start_kernel(multiboot_info_t *info)
{
	unsigned long long int i;
	struct runtime_opt opts;

	early_printk("start kernel ...\n");

	assert(info->flags & (1 << 6));

	memory_map_t *mmap = (void *)info->mmap_addr;

	while ((u32)mmap < info->mmap_addr + info->mmap_length)
	{
		if (mmap->type == 2)
		{
			for (i = 0; i < mmap->length_low; i += 0x1000)
			{
				if (mmap->base_addr_high > 0) continue;
				frame_ref_once ((mmap->base_addr_low + i) & PAGE_MASK);
			}
		}
		mmap = (memory_map_t *)((u32)mmap + mmap->size + sizeof(u32));
	}

	/* mem/paging */
	if (paging_init())
		panic("Fatal error: memory cannot be mapped\n");

	console_init();
	tty_init();

	kmalloc_init();

	cpuinfo_dump();

	cmdline_fill_opts(&opts);

	printk(KERN_INFO, "Atomos boot process done\n");

	if (info->mods_count == 0)
		start_runtime(NULL, 0, NULL, &opts);
	else
		start_runtime((void *)boot_module.addr,
			      (long)boot_module.len,
			      boot_module.name, &opts);

	for (;;)
		;
}

void init(void)
{
}<commit_msg>core: remove init function in main.c and clean head comment<commit_after>/*
 * File main.c
 * Author: <NAME> <<EMAIL>>
 *
 * Description: setup the operating system (mostly non arch-dependent)
 */
#include <kernel/pyr0.h>
#include <kernel/console.h>
#include <kernel/mm.h>
#include <kernel/kmalloc.h>
#include <kernel/mman.h>
#include <kernel/serial.h>
#include <kernel/tty.h>
#include <kernel/cpuinfo.h>
#include <kernel/cmdline.h>

#include <asm/system.h>
#include <asm/pgtable.h>

#include "../boot/multiboot.h"

extmodule_t boot_module;

void start_kernel(multiboot_info_t *info)
{
	unsigned long long int i;
	struct runtime_opt opts;

	early_printk("start kernel ...\n");

	assert(info->flags & (1 << 6));

	memory_map_t *mmap = (void *)info->mmap_addr;

	while ((u32)mmap < info->mmap_addr + info->mmap_length)
	{
		if (mmap->type == 2)
		{
			for (i = 0; i < mmap->length_low; i += 0x1000)
			{
				if (mmap->base_addr_high > 0) continue;
				frame_ref_once ((mmap->base_addr_low + i) & PAGE_MASK);
			}
		}
		mmap = (memory_map_t *)((u32)mmap + mmap->size + sizeof(u32));
	}

	/* mem/paging */
	if (paging_init())
		panic("Fatal error: memory cannot be mapped\n");

	console_init();
	tty_init();

	kmalloc_init();

	cpuinfo_dump();

	cmdline_fill_opts(&opts);

	printk(KERN_INFO, "Atomos boot process done\n");

	if (info->mods_count == 0)
		start_runtime(NULL, 0, NULL, &opts);
	else
		start_runtime((void *)boot_module.addr,
			      (long)boot_module.len,
			      boot_module.name, &opts);

	for (;;)
		;
}
{'fraction_non_alphanumeric': 0.1700524246395806, 'fraction_numerical': 0.012450851900393184, 'mean_word_length': 3.9162640901771337, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7611618', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1190, 'n_words': 261}