- For timer-interrupt-induced context switch to work
- scheduler: you need to implement
THREAD_INIT
andTHREAD_RUN
.
- scheduler: you need to implement
- For svc-interrupt-induced context switch to work
- scheduler: you need to implement
THREAD_INIT
,THREAD_RUN
andTHREAD_SLEEP
. - case SYSCALL_RD_WORD in trap_handler
- case SYSCALL_WR_WORD in trap_handler
- do_dev_word
- wake_thread
- scheduler: you need to implement
- To test timer-interrupt-induced context switch:
- uncomment the part for testing timer-interrupt context switch here
- To test svc-interrupt-induced context switch:
- uncomment the part for testing svc-interrupt context switch here
- start a thread in shell (for example do_blinker) and see if they are running simultaneously.
- read p5.pdf to learn how to start a thread in shell