Page MenuHomePhabricator

[libc] Add implementations of the C standard condition variable functions.
ClosedPublic

Authored by sivachandra on Aug 30 2021, 2:01 PM.

Diff Detail

Unit TestsFailed

TimeTest
60 msx64 debian > LLVM.CodeGen/WebAssembly::lower-em-sjlj-indirect-setjmp.ll
Script: -- : 'RUN: at line 1'; not --crash /var/lib/buildkite-agent/builds/llvm-project/build/bin/llc < /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/WebAssembly/lower-em-sjlj-indirect-setjmp.ll -enable-emscripten-sjlj 2>&1 | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/WebAssembly/lower-em-sjlj-indirect-setjmp.ll
90 msx64 debian > LLVM.tools/llvm-profdata::forward-compatible.test
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/llvm-profdata show -sample /var/lib/buildkite-agent/builds/llvm-project/llvm/test/tools/llvm-profdata/Inputs/unknown.section.extbin.profdata | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/llvm/test/tools/llvm-profdata/forward-compatible.test
120 msx64 windows > LLVM.CodeGen/WebAssembly::lower-em-sjlj-indirect-setjmp.ll
Script: -- : 'RUN: at line 1'; not --crash c:\ws\w2\llvm-project\premerge-checks\build\bin\llc.exe < C:\ws\w2\llvm-project\premerge-checks\llvm\test\CodeGen\WebAssembly\lower-em-sjlj-indirect-setjmp.ll -enable-emscripten-sjlj 2>&1 | c:\ws\w2\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w2\llvm-project\premerge-checks\llvm\test\CodeGen\WebAssembly\lower-em-sjlj-indirect-setjmp.ll
140 msx64 windows > LLVM.tools/llvm-profdata::forward-compatible.test
Script: -- : 'RUN: at line 1'; c:\ws\w2\llvm-project\premerge-checks\build\bin\llvm-profdata.exe show -sample C:\ws\w2\llvm-project\premerge-checks\llvm\test\tools\llvm-profdata/Inputs/unknown.section.extbin.profdata | c:\ws\w2\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w2\llvm-project\premerge-checks\llvm\test\tools\llvm-profdata\forward-compatible.test

Event Timeline

sivachandra created this revision.Aug 30 2021, 2:01 PM
sivachandra requested review of this revision.Aug 30 2021, 2:01 PM

I will be adding more tests but sending this out early to get feedback on the actual implementation.

Rebase and add another test.

michaelrj accepted this revision.Sep 27 2021, 3:43 PM

LGTM

libc/src/threads/linux/CndVar.h
59

are these braces necessary?

This revision is now accepted and ready to land.Sep 27 2021, 3:43 PM
sivachandra added inline comments.Sep 28 2021, 1:30 PM
libc/src/threads/linux/CndVar.h
59

These are for the RAII MutexLock class instantiated on line 60.

michaelrj added inline comments.Sep 28 2021, 1:32 PM
libc/src/threads/linux/CndVar.h
59

ah, that makes sense. All good then.

This revision was landed with ongoing or failed builds.Sep 28 2021, 2:19 PM
This revision was automatically updated to reflect the committed changes.