diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 19:11:45 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 19:11:45 +0100 |
commit | 7cf710f6587e71a193a55d84dd6d8ae1a8a69ce0 (patch) | |
tree | db628840acea83dbccaf5676b89579a80e02ef51 /tests/pthread.in.h | |
parent | d83e85a2e6064c36f6ad3c848e39d8b8c101c4f7 (diff) | |
parent | 00893e79fc62966067af1a106567db96bd170338 (diff) |
Update upstream source from tag 'upstream/1.2'
Update to upstream version '1.2'
with Debian dir 16dafe941db3036235f48227f29c6a73587c376d
Diffstat (limited to 'tests/pthread.in.h')
-rw-r--r-- | tests/pthread.in.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/pthread.in.h b/tests/pthread.in.h index cf9ca3a4..cd705fbd 100644 --- a/tests/pthread.in.h +++ b/tests/pthread.in.h @@ -1,6 +1,6 @@ /* Implement the most essential subset of POSIX 1003.1-2008 pthread.h. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -51,6 +51,12 @@ #ifndef _@GUARD_PREFIX@_PTHREAD_H_ #define _@GUARD_PREFIX@_PTHREAD_H_ +/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #define __need_system_stdlib_h #include <stdlib.h> #undef __need_system_stdlib_h @@ -409,7 +415,21 @@ typedef pthread_mutex_t pthread_spinlock_t; # define PTHREAD_PROCESS_PRIVATE 0 # define PTHREAD_PROCESS_SHARED 1 #else -# if !@HAVE_PTHREAD_SPINLOCK_T@ +# if @HAVE_PTHREAD_SPINLOCK_T@ +/* <pthread.h> exists and defines pthread_spinlock_t. */ +# if !(((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \ + || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 1)) \ + || (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \ + && !defined __ANDROID__) \ + || __clang_major__ >= 3)) \ + && !defined __ibmxl__) +/* We can't use GCC built-ins. Approximate spinlocks with mutexes. */ +# if !GNULIB_defined_pthread_spin_types +# define pthread_spinlock_t pthread_mutex_t +# define GNULIB_defined_pthread_spin_types 1 +# endif +# endif +# else /* Approximate spinlocks with mutexes. */ # if !GNULIB_defined_pthread_spin_types typedef pthread_mutex_t pthread_spinlock_t; |