--- On Sat, 3/24/12, Konstantin Belousov <kostik...@gmail.com> wrote:
> No, I mentioned exactly this in paragraph you replied to. > To actually start executing from runq, thread needs to > transition > from kernel to userspace (in other words, thread appears on > runq > due to interrupt, thus entering kernel space). On the > kernel->user > transition, the thread will be suspended in AST handler. > > So, if pending AST catched usermode thread on runq, no > single usermode > instruction is executed by the thread before suspension. > Got it. Basically if the usermode thread's time slice is up, AST handler (triggered due timer interrupt) would switch-out the thread when it sees TDF_NEERESCHED flag. When thread starts running again, userret() called from AST handler would check for suspension. I guess it was much ado about nothing. At least I got understand the code little better. Much thanks for that. Sushanth _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"