Re: Simulator loop task.

2022-07-22 Thread Fotis Panagiotopoulos
Hello, SIM_WALLTIME_SIGNAL indeed seems the correct option for me, exactly what I need. Unfortunately, it is not working. The function sim_timer_update() is correctly called on the first signal that the host delivers. Then the simulation crashes during the execution of the function oneshot_callba

Re: Simulator loop task.

2022-07-22 Thread Xiang Xiao
On Fri, Jul 22, 2022 at 6:58 PM Fotis Panagiotopoulos wrote: > The loop task indeed needs to run in high priority. I provided a PR for > this. > > However, the functionality in up_idle cannot be transferred to the loop > function. This is because: > * Either the loop task will execute, and no one

Re: Simulator loop task.

2022-07-22 Thread Fotis Panagiotopoulos
The loop task indeed needs to run in high priority. I provided a PR for this. However, the functionality in up_idle cannot be transferred to the loop function. This is because: * Either the loop task will execute, and no one will be able to preempt it. * Or the loop task will get to sleep, but wil

Re: Simulator loop task.

2022-07-21 Thread Xiang Xiao
On Fri, Jul 22, 2022 at 12:12 AM Fotis Panagiotopoulos wrote: > Here is the actual issue: > > The timer g_system_timer is updated in the IDLE task. > This causes problems, because time is not advancing if the system does not > have any idle time. > > Ok, you don't enable tickless mode. If you en

Re: Simulator loop task.

2022-07-21 Thread Fotis Panagiotopoulos
Here is the actual issue: The timer g_system_timer is updated in the IDLE task. This causes problems, because time is not advancing if the system does not have any idle time. The timer behaves erratically, or just gets stuck. For example, a spin-lock-like structure, as is the following snippet, w

Re: Simulator loop task.

2022-07-21 Thread Xiang Xiao
On Thu, Jul 21, 2022 at 11:27 PM Fotis Panagiotopoulos wrote: > Hello, > > I am having some issues with scheduling in simulator. > I noticed that there is a "loop task", that performs various house-keeping > tasks. > > This task is started with a priority of SCHED_PRIORITY_MIN. > Is this correct

Simulator loop task.

2022-07-21 Thread Fotis Panagiotopoulos
Hello, I am having some issues with scheduling in simulator. I noticed that there is a "loop task", that performs various house-keeping tasks. This task is started with a priority of SCHED_PRIORITY_MIN. Is this correct / on-purpose? I would expect this task to run on maximum priority, simulating