main.c
I don't mean to write the whole OS kernel.I just want to put what I have
already learned into practice.But what will it be end up looking like.
I don't know.ALA I have some free time,I will write something.Just like
linus once said,"Just for fun".I don't care what this small ugly codes
will be capable of,or does it worth something.I just write it for fun,
and for practice.
10 / 3 / 2010 liangtao
E-mail:liangtao90s@gmail.com
#include
#include
#include
#include
#include
__syscall0(void, syscall_test)
__syscall0(int, fork)
void start_kernel(void)
{
putstr_init(); /* in kernel/vsprintf.c */
setup_e820_map(); /* in kernel/mm/e820.c */
show_mem_info(); /* in kernel/mm/e820.c */
trap_init(); /* in kernel/asm/interrupt.c */
sched_init(); /* in kernel/sched.c */
sti(); /* in include/asm/system.h */
move_to_user_mode(); /* in include/asm/system.h */
if(fork()) { /* in kernel/fork.c */
/* mutex should be add */
while(1) {
stupid_putstr("A");
}
} else {
while(1){
stupid_putstr("B");
}
}
}
阅读(2002) | 评论(0) | 转发(0) |