|
发表于 2005-6-24 16:02:18
|
显示全部楼层
不能说是根本性的改动啊,linux内核完全注释上写的是0.11版吧,差太多了。
我看过0.11版1.2版2.0版2.4版和2.6版的init/main.c文件,这些初始化函数是逐步增多的。
其中有些是根据Documentation/CodingStyle的原则将一个初始化函数分裂而成的。
我这还有0.01版的,很清晰:
- void main(void) /* This really IS void, no error here. */
- { /* The startup routine assumes (well, ...) this */
- /*
- * Interrupts are still disabled. Do necessary setups, then
- * enable them
- */
- time_init();
- tty_init();
- trap_init();
- sched_init();
- buffer_init();
- hd_init();
- sti();
- move_to_user_mode();
- if (!fork()) { /* we count on this going ok */
- init();
- }
- /*
- * NOTE!! For any other task 'pause()' would mean we have to get a
- * signal to awaken, but task0 is the sole exception (see 'schedule()')
- * as task 0 gets activated at every idle moment (when no other tasks
- * can run). For task0 'pause()' just means we go check if some other
- * task can run, and if not we return here.
- */
- for(;;) pause();
- }
复制代码 |
|