[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
__switch_to()
Hi, when the OS task switches, it calls __switch_to(prev, next) function
in arch/i386/kernel/process.c. I was just curious about the parameters
prev and next. Normally, I would expect the pid of prev and next in
successive calls to __switch_to() to be like the following:
prev->pid: 0, next->pid: 100
prev->pid: 100, next->pid: 20
prev->pid: 20, next->pid 0
prev->pid: 0, next->pid 20
where the previous next->pid will be the same as the current prev->pid.
I am wondering whether it is possible to have this constraint violated in
any case? For instance, when a task terminates? Thanks.
-
Hai
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/