I don't know GNUmach very well, but here's what I found by
peeking around with id-utils.  If I got things right, the code
path from a timer interrupt to a task switch goes like this:

i386/i386/locore.S (int_entry_table)
i386/i386/locore.S (all_intrs)
i386/i386at/interrupt.S (interrupt)
i386/i386at/pic_isa.c (ivect)
i386/i386/hardclock.c (hardclock)
kern/mach_clock.c (clock_interrupt)
kern/priority.c (thread_quantum_update)
kern/ast.c (ast_check)
kern/ast.h (ast_on)

ast_on sets a flag (need_ast), and then i386/i386/locore.S calls:

i386/i386/trap.c (i386_astintr)
kern/ast.c (ast_taken)
kern/sched_prim.c (thread_block) -- called from numerous places
kern/sched_prim.c (thread_invoke)
i386/i386/pcb.c (switch_context)
i386/i386/cswitch.S (Switch_context)

Reply via email to