- 论坛徽章:
- 0
|
如题:程序跑到kernal/sched/core.c ,这个函数后,在调用schedule()函数时过不去。
asmlinkage void __sched schedule(void)
{
struct task_struct *tsk = current;
sched_submit_work(tsk);
__schedule();
printascii("2986\n"); //串口输出 2986(行号)
}
EXPORT_SYMBOL(schedule);
/**
* schedule_preempt_disabled - called with preemption disabled
*
* Returns with preemption disabled. Note: preempt_count must be 1
*/
void __sched schedule_preempt_disabled(void)
{
sched_preempt_enable_no_resched();
printascii("schedule() 3014\n"); //串口输出标记
schedule();
printascii("preempt_disable() 3016\n");
preempt_disable();
}
串口打印出信息:
Uncompressing Linux... done, booting the kernel.
s3c24xx_serial_console_setup: co=802c32c4 (0), 115200
/init/main.c 388
schedule() 3014
2986
2986
2986
2986
2986
2986
2986
。
。
。
共百来个2986
。
之后死机
。
大为不解原理上 函数schedule()退出后会执行
printascii("preempt_disable() 3016\n");
但是串口上并没有输出数据。
为什么会出现这种情况?
本人菜鸟,问的问题可能有点弱智,还请大神们帮忙和谅解!谢谢!
|
|