Commit Graph

6 Commits

Author SHA1 Message Date
Saiiijchan
1bb2a0961c pthread_cond: refine prvInitializeStaticCond() (#42)
- On v11.1 SMP, pvPortMalloc() should not be called in critical secion.
  vTaskSuspenAll() would trigger assert if in criticalsection.
- The pthread_cond APIs are not ISR safe. Use vTaskSuspendAll() to prevent
  race condition is enough.

Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn>
Co-authored-by: wangfei_chen <wangfei_chen@realsil.com.cn>
2025-03-31 14:40:19 +05:30
Gaurav Aggarwal
341a8dc6d1 Add a minimal project which builds all the files
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2025-03-10 15:48:35 +00:00
Ryan Shumate
21d06399f6 pthread_cond: Use Task Notifications (#34)
Update the pthread_cond_t implementation to utilize Task Notifications.
In the existing implementation, if multiple threads of different
priority are blocked on the same condition, a higher priority thread, in
most cases, will unblock multiple times due to taking the underlying
semaphore multiple times instead of just once. Switching to Task
notifications guarantees that all tasks are equally notified and
unblocked.

pthread_cond_signal has also been updated to conform to the POSIX
specification in that it will unblock the highest priority task waiting
on the condition.

Resolves #8
2024-12-31 17:51:13 -08:00
Rohit Madan
e6b133f3b3 Update pthread_cond_timedwait to cope with clock failure (#33) 2024-11-10 17:34:23 +05:30
Yuhui Zheng
fd8dae8a25 Fix "warning: #1-D: last line of file ends without a newline."
And make the end of the file consistent.

Signed-off-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
2020-02-26 11:34:16 -08:00
Yuhui Zheng
eb87d247f9 After this commit, this repository contains only POSIX source code. 2020-02-21 11:58:33 -08:00