You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/22 10:31:43 UTC

[GitHub] [incubator-nuttx] fjpanag opened a new pull request, #6689: sim: Increased priority of loop task.

fjpanag opened a new pull request, #6689:
URL: https://github.com/apache/incubator-nuttx/pull/6689

   ## Summary
   
   In simulator there is the loop task that performs various house-keeping functions.  
   It mostly emulates functions that normally would happen in interrupts.
   
   This task was assigned a very low priority, so house-keeping was taking place if and when there was any idle time in the system.
   In case of high load, it couldn't run.
   
   This PR increases the loop task priority to max, as it is better suited for its interrupt-like role.
   
   ## Impact
   
   Simulator house-keeping tasks run more reliably and steadily, even in high load cases.
   
   ## Testing
   
   After the change I run the simulator and used my firmware. It seems that nothing is broken.
   
   Simultaneously, I tested whether it fixes things.  
   I have a piece of code that looks like this:
   
   ```c
   	clock_t start = clock();
   
   	char buf[1];
   	while (read(s_dev, buf, 1) == 1)
   	{
   		// Do stuff with the received byte.
   
   		if ((clock() - start) > TIMEOUT)
   			break;
   	}
   ```
   
   This was not working before, as there was no idle CPU time for the loop task to operate (although it works on an actual hardware target).
   
   After the change, I am able to receive bytes from the simulated serial port.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6689: sim: Increased priority of loop task.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6689:
URL: https://github.com/apache/incubator-nuttx/pull/6689


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org