mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-01 18:22:27 +00:00
Release Cosmopolitan v3.6.0
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
This commit is contained in:
parent
62ace3623a
commit
5660ec4741
1585 changed files with 117353 additions and 271644 deletions
|
@ -9,6 +9,7 @@
|
|||
#ifndef _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H
|
||||
#define _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H
|
||||
|
||||
#include <__chrono/duration.h>
|
||||
#include <__chrono/steady_clock.h>
|
||||
#include <__chrono/system_clock.h>
|
||||
#include <__chrono/time_point.h>
|
||||
|
@ -16,10 +17,11 @@
|
|||
#include <__mutex/mutex.h>
|
||||
#include <__mutex/unique_lock.h>
|
||||
#include <__system_error/system_error.h>
|
||||
#include <__threading_support>
|
||||
#include <__thread/support.h>
|
||||
#include <__type_traits/enable_if.h>
|
||||
#include <__type_traits/is_floating_point.h>
|
||||
#include <__utility/move.h>
|
||||
#include <limits>
|
||||
#include <ratio>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
@ -37,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
_LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
|
||||
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
|
||||
|
||||
class _LIBCPP_TYPE_VIS condition_variable {
|
||||
class _LIBCPP_EXPORTED_FROM_ABI condition_variable {
|
||||
__libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
|
||||
|
||||
public:
|
||||
|
@ -91,9 +93,8 @@ private:
|
|||
};
|
||||
#endif // !_LIBCPP_HAS_NO_THREADS
|
||||
|
||||
template <class _Rep, class _Period>
|
||||
inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<is_floating_point<_Rep>::value, chrono::nanoseconds>
|
||||
__safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
|
||||
template <class _Rep, class _Period, __enable_if_t<is_floating_point<_Rep>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
|
||||
using namespace chrono;
|
||||
using __ratio = ratio_divide<_Period, nano>;
|
||||
using __ns_rep = nanoseconds::rep;
|
||||
|
@ -112,9 +113,8 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
|
|||
return nanoseconds(static_cast<__ns_rep>(__result_float));
|
||||
}
|
||||
|
||||
template <class _Rep, class _Period>
|
||||
inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<!is_floating_point<_Rep>::value, chrono::nanoseconds>
|
||||
__safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
|
||||
template <class _Rep, class _Period, __enable_if_t<!is_floating_point<_Rep>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
|
||||
using namespace chrono;
|
||||
if (__d.count() == 0) {
|
||||
return nanoseconds(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue