[libcxx-commits] [PATCH] D89871: [libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined.

Hafiz Abid Qadeer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 21 04:27:55 PDT 2020


abidh created this revision.
abidh added reviewers: libcxx-commits, ldionne.
abidh added a project: libc++abi.
abidh requested review of this revision.

While running this test on a bare metal target, I got an error as 'sleep' was not available on that system. As 'sleep' call is not doing anything useful for cases when _LIBCXXABI_HAS_NO_THREADS is defined. This patch puts it under this check.


https://reviews.llvm.org/D89871

Files:
  libcxxabi/test/test_exception_storage.pass.cpp


Index: libcxxabi/test/test_exception_storage.pass.cpp
===================================================================
--- libcxxabi/test/test_exception_storage.pass.cpp
+++ libcxxabi/test/test_exception_storage.pass.cpp
@@ -29,7 +29,9 @@
         std::printf("Got different globals!\n");
 
     *result = (size_t) glob1;
+#ifndef _LIBCXXABI_HAS_NO_THREADS
     sleep ( 1 );
+#endif
     return parm;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89871.299637.patch
Type: text/x-patch
Size: 409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201021/a2795506/attachment.bin>


More information about the libcxx-commits mailing list