Commit Graph

4 Commits

Author SHA1 Message Date
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