[libc++] Add basic runtime assertions to <semaphore>
authorEdoardo Sanguineti <edoardo.sanguineti222@gmail.com>
Wed, 19 Jul 2023 21:29:25 +0000 (17:29 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 19 Jul 2023 21:29:59 +0000 (17:29 -0400)
commit42a024fad9fca3fbe37afd55681e84dc60dd1abe
tree083bc7fa52510a9ca515dca0ea14eb6a5888b805
parent245073ac80b3a2ab942ac3c81126c14037501945
[libc++] Add basic runtime assertions to <semaphore>

Adding assertions will aid users that have bugs or logic mistakes in
their code to receive error messages when debugging.

Differential Revision: https://reviews.llvm.org/D155399
libcxx/include/semaphore
libcxx/test/libcxx/thread/thread.semaphore/assert.ctor.pass.cpp [new file with mode: 0644]
libcxx/test/libcxx/thread/thread.semaphore/assert.release.pass.cpp [new file with mode: 0644]
libcxx/test/std/thread/thread.semaphore/ctor.verify.cpp [new file with mode: 0644]