]> begriffs open source - freertos/commit
Mark mutex as robust to prevent deadlocks (#1233)
authorGaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Wed, 29 Jan 2025 01:57:30 +0000 (07:27 +0530)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2025 01:57:30 +0000 (07:27 +0530)
commitad4e7238293cbe994e7450e1bc415136875da322
tree7c23e2c461b918cde6e32b7e7dcf17a96b1ce60f
parentf94bc89108ffca538cf91d5856149960a5d4be81
Mark mutex as robust to prevent deadlocks (#1233)

Mark mutex as robust to prevent deadlocks

Prevent application hangs that occur when a thread dies while holding a
mutex, particularly during vTaskEndScheduler or exit calls. This is
achieved by setting the PTHREAD_MUTEX_ROBUST attribute on the mutex.

Fixes:
- GitHub issue: FreeRTOS/FreeRTOS-Kernel#1217
- Forum thread: freertos.org/t/22287

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
portable/ThirdParty/GCC/Posix/port.c
portable/ThirdParty/GCC/Posix/utils/wait_for_event.c