This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add implementation of cnd_* functions from threads.h for linux.
Needs ReviewPublic

Authored by sivachandra on May 21 2020, 12:07 PM.

Details

Reviewers
phosek
Summary

Implementations of all cnd_* functions except cnd_timedwait function
have been added. As with other threads functions, the goal is to keep
the C standard library functions as light weight and as self-contained
as possible (as in, support only the C standard library features and
not bloat with features which other standards like POSIX require.)

Diff Detail

Event Timeline

sivachandra created this revision.May 21 2020, 12:07 PM

Fix few header guards and a typo.

Just pointing out: there are opportunities to optimize over this implementation I have added. However, it adds more branches at various places and makes it not so easy to follow in the first pass. So, I will take up the optimizations in a follow up pass.