My kernel version is 2.4.1 and the processor is an MIPS R4000
style embedded processor.
I ues the serial port as my console.
I found that the reason why the printf message will not be
completely outputed is the process of my testing program will not be selected
again by the schedular after outputing some message.
Its "state" is TASK_INTERRUPTIBLE but the return value of
signal_pending(prev) is zero.
Therefore, it is deleted from running queue in
schedul() and never wake up.
asmlinkage void schedule(void)
{
...
...
move_rr_back:
switch (prev->state) { case TASK_INTERRUPTIBLE: if (signal_pending(prev)) { prev->state = TASK_RUNNING; break;
}
default: del_from_runqueue(prev); (<---- Be deleted here!) case TASK_RUNNING: } ... ...
}
I am not familiar with the machanism of
tty_write().
Can any body tell me where should be chceked
over?
My serial driver is modified based on
drivers/char/serial.c
Thanks.
|