#include <bits/chrono.h>
#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
-#include <exception> // std::terminate
#include <sys/time.h>
#endif
#if __cplusplus >= 201103L
typedef decltype(nullptr) nullptr_t;
#endif
+
+ // This allows the library to terminate without including all of <exception>
+ // and without making the declaration of std::terminate visible to users.
+ __attribute__ ((__noreturn__, __always_inline__))
+ inline void __terminate() _GLIBCXX_USE_NOEXCEPT
+ {
+ void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
+ terminate();
+ }
}
#define _GLIBCXX_USE_DUAL_ABI
#endif // __cpp_lib_atomic_wait
#ifdef _GLIBCXX_HAVE_POSIX_SEMAPHORE
-# include <exception> // std::terminate
# include <cerrno> // errno, EINTR, EAGAIN etc.
# include <limits.h> // SEM_VALUE_MAX
# include <semaphore.h> // sem_t, sem_init, sem_wait, sem_post etc.
if (__err && (errno == EINTR))
continue;
else if (__err)
- std::terminate();
+ std::__terminate();
else
break;
}
else if (__err && (errno == EAGAIN))
return false;
else if (__err)
- std::terminate();
+ std::__terminate();
else
break;
}
{
auto __err = sem_post(&_M_semaphore);
if (__err)
- std::terminate();
+ std::__terminate();
}
}
else if (errno == ETIMEDOUT || errno == EINVAL)
return false;
else
- std::terminate();
+ std::__terminate();
}
else
break;
#if __cplusplus >= 201103L
#include <bits/c++config.h>
-#include <exception> // std::terminate
#include <iosfwd> // std::basic_ostream
#include <tuple> // std::tuple
#include <bits/functional_hash.h> // std::hash
~thread()
{
if (joinable())
- std::terminate();
+ std::__terminate();
}
thread(const thread&) = delete;
thread& operator=(thread&& __t) noexcept
{
if (joinable())
- std::terminate();
+ std::__terminate();
swap(__t);
return *this;
}
void
std::terminate () throw()
{
- __terminate (get_terminate ());
+ __cxxabiv1::__terminate (get_terminate ());
}
void