sebastianene07 opened a new pull request #1602: URL: https://github.com/apache/incubator-nuttx/pull/1602
## Summary This patch extends the existing functionality by adding a new option : `CONFIG_SIM_PREEMPTIBLE`. This option changes the way we are generating timer events in `up_hosttime.c` by using an external host timer that sends periodic signals to the simulation. Previously the events were sent from the ` Idle Task` logic by periodically calling `up_timer_update`. The patch improves this logic by adding an event driven implementation and changes the way we are doing context switching using the `ucontext API`. I have [another PR opened](https://github.com/apache/incubator-nuttx/pull/1009) that is using a different context switching mechanism with `sigsetjmp/siglongjmp` but this approach doesn't work on SMP configurations. ## Impact The current implementation doesn't affect the existing implementation when `CONFIG_SIM_PREEMPTIBLE=n`. ## Testing I validated the patch using `sim/ostest` config on both MacOS and Linux machines using `CONFIG_SIM_PREEMPTIBLE=y` and 'CONFIG_RR_INTERVAL=1'. ---------------------------------------------------------------- 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