xiaoxiang781216 commented on a change in pull request #1009: URL: https://github.com/apache/incubator-nuttx/pull/1009#discussion_r422495320
########## File path: arch/sim/src/sim/up_interruptcontext.c ########## @@ -43,10 +43,47 @@ #include <nuttx/arch.h> #include "up_internal.h" +#ifdef CONFIG_SIM_PREEMPTIBLE +uint32_t host_signal_save(void); Review comment: Maybe like this: 1.The alarm timer 2.ucontext 3.nsh3 config But I suggest that: 1.Move alarm timer into up_oneshot.c We don't need create another timer implementation, it's better to enhance up_oneshot.c directly which is much more simple. I suppose you just need add 100~ lines to support this feature. 2.We don't need save/restore context by ucontext API, so it's better to drop ucontext patch. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org