clean
This commit is contained in:
parent
11125325ca
commit
8e2017bd29
37
src/kernel.c
37
src/kernel.c
@ -30,28 +30,6 @@
|
|||||||
#error "This tutorial needs to be compiled with a ix86-elf compiler"
|
#error "This tutorial needs to be compiled with a ix86-elf compiler"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void uwu(void)
|
|
||||||
{
|
|
||||||
kprintf("uwu\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void owo(void)
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
kprintf("owoooooooooooooooooooooooooooooooooooo\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void awa(void)
|
|
||||||
{
|
|
||||||
uint32_t pid = fork();
|
|
||||||
PRINT_INT(pid);
|
|
||||||
if (pid < 0)
|
|
||||||
kprintf("awais");
|
|
||||||
kprintf("awaille\n");
|
|
||||||
if (pid)
|
|
||||||
wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void bozo(int int_code)
|
static void bozo(int int_code)
|
||||||
{
|
{
|
||||||
kprintf("apagnan code\n");
|
kprintf("apagnan code\n");
|
||||||
@ -69,21 +47,6 @@ void kernel_main(multiboot_info_t *mbd, uint32_t magic)
|
|||||||
// " "complex 8*unknown quantity -byte descriptor table. -- Troy
|
// " "complex 8*unknown quantity -byte descriptor table. -- Troy
|
||||||
// " "Martin 03:50, 22 March 2009 (UTC)\n");
|
// " "Martin 03:50, 22 March 2009 (UTC)\n");
|
||||||
create_kernel_task();
|
create_kernel_task();
|
||||||
vmalloc(1231231);
|
|
||||||
// uint32_t nb_alloc = 0;
|
|
||||||
// while (kmalloc(10))
|
|
||||||
// nb_alloc++;
|
|
||||||
// kprintf("%d\n", nb_alloc);
|
|
||||||
for (uint8_t i = 0; i < 10; i++)
|
|
||||||
vmalloc(32);
|
|
||||||
char *str = kmalloc(20);
|
|
||||||
show_kalloc_mem();
|
|
||||||
strcpy(str, "test\n");
|
|
||||||
kprintf("%s", str);
|
|
||||||
// exec_fn(owo);
|
|
||||||
// exec_fn(owo);
|
|
||||||
// exec_fn(owo);
|
|
||||||
// exec_fn(owo);
|
|
||||||
kill(0, 4);
|
kill(0, 4);
|
||||||
for (size_t i = 0; i < 10000; i++)
|
for (size_t i = 0; i < 10000; i++)
|
||||||
free_pages(alloc_pages(1, NULL), 1);
|
free_pages(alloc_pages(1, NULL), 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user