]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - support/support_record_failure.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / support / support_record_failure.c
index 356798f55608ca7116be84aa6c76ff62d0b1732b..9df679c4ccd208c44e3e03f49376118091f92e3e 100644 (file)
@@ -1,5 +1,5 @@
 /* Global test failure counter.
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <support/check.h>
 #include <support/support.h>
@@ -104,3 +104,11 @@ support_record_failure_reset (void)
   __atomic_store_n (&state->failed, 0, __ATOMIC_RELAXED);
   __atomic_add_fetch (&state->counter, 0, __ATOMIC_RELAXED);
 }
+
+int
+support_record_failure_is_failed (void)
+{
+  /* Relaxed MO is sufficient because we need (blocking) external
+     synchronization for reliable test error reporting anyway.  */
+  return __atomic_load_n (&state->failed, __ATOMIC_RELAXED);
+}