]> begriffs open source - freertos/commit
Posix: Fix no task switching issue if a task ended its main function (#184)
authorReda Maher <52288047+RedaMaher@users.noreply.github.com>
Tue, 6 Oct 2020 01:06:51 +0000 (03:06 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Oct 2020 01:06:51 +0000 (18:06 -0700)
commit77ad7174005e59321765b1a9ace3f20b5ab029f1
treef508aaa6fbe31fe8bce2c302d8f8bf55b4223923
parentfccb97b10b79bce9cdd22a7d6902dd9ece0402ee
Posix: Fix no task switching issue if a task ended its main function (#184)

* Posix: Fix no task switching issue if a task ended

When the main function of a task exits, no task switching happened.
This is because all the remaining tasks are waiting on the condition
variable. The fix is to trigger a task switch and mark the exiting
task as "Dying" to be suspened and exited properly from the scheduler.

* Posix: Assert and stop if the Task function returned

* Posix: just assert if a task returned from its main function

Co-authored-by: alfred gedeon <alfred2g@hotmail.com>
portable/ThirdParty/GCC/Posix/port.c