Scheduler calls thread function or pop_registers_and_iret