[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
include
/
c++
/
8
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 backward
SET
[ DEL ]
📁 bits
SET
[ DEL ]
📁 debug
SET
[ DEL ]
📁 decimal
SET
[ DEL ]
📁 experimental
SET
[ DEL ]
📁 ext
SET
[ DEL ]
📁 parallel
SET
[ DEL ]
📁 profile
SET
[ DEL ]
📁 tr1
SET
[ DEL ]
📁 tr2
SET
[ DEL ]
📁 x86_64-redhat-linux
SET
[ DEL ]
📄 algorithm
2,518 B
SET
[ EDIT ]
|
[ DEL ]
📄 any
18,604 B
SET
[ EDIT ]
|
[ DEL ]
📄 array
11,657 B
SET
[ EDIT ]
|
[ DEL ]
📄 atomic
41,057 B
SET
[ EDIT ]
|
[ DEL ]
📄 bitset
45,910 B
SET
[ EDIT ]
|
[ DEL ]
📄 cassert
1,648 B
SET
[ EDIT ]
|
[ DEL ]
📄 ccomplex
1,335 B
SET
[ EDIT ]
|
[ DEL ]
📄 cctype
2,409 B
SET
[ EDIT ]
|
[ DEL ]
📄 cerrno
1,770 B
SET
[ EDIT ]
|
[ DEL ]
📄 cfenv
2,051 B
SET
[ EDIT ]
|
[ DEL ]
📄 cfloat
1,889 B
SET
[ EDIT ]
|
[ DEL ]
📄 charconv
16,708 B
SET
[ EDIT ]
|
[ DEL ]
📄 chrono
29,874 B
SET
[ EDIT ]
|
[ DEL ]
📄 cinttypes
2,157 B
SET
[ EDIT ]
|
[ DEL ]
📄 ciso646
1,464 B
SET
[ EDIT ]
|
[ DEL ]
📄 climits
1,913 B
SET
[ EDIT ]
|
[ DEL ]
📄 clocale
1,905 B
SET
[ EDIT ]
|
[ DEL ]
📄 cmath
48,142 B
SET
[ EDIT ]
|
[ DEL ]
📄 codecvt
5,341 B
SET
[ EDIT ]
|
[ DEL ]
📄 complex
54,537 B
SET
[ EDIT ]
|
[ DEL ]
📄 complex.h
1,596 B
SET
[ EDIT ]
|
[ DEL ]
📄 condition_variable
8,954 B
SET
[ EDIT ]
|
[ DEL ]
📄 csetjmp
1,949 B
SET
[ EDIT ]
|
[ DEL ]
📄 csignal
1,855 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdalign
1,407 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdarg
1,868 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdbool
1,401 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstddef
6,440 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdint
2,167 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdio
4,439 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstdlib
6,325 B
SET
[ EDIT ]
|
[ DEL ]
📄 cstring
3,123 B
SET
[ EDIT ]
|
[ DEL ]
📄 ctgmath
1,360 B
SET
[ EDIT ]
|
[ DEL ]
📄 ctime
2,125 B
SET
[ EDIT ]
|
[ DEL ]
📄 cuchar
2,210 B
SET
[ EDIT ]
|
[ DEL ]
📄 cwchar
6,509 B
SET
[ EDIT ]
|
[ DEL ]
📄 cwctype
2,793 B
SET
[ EDIT ]
|
[ DEL ]
📄 cxxabi.h
21,977 B
SET
[ EDIT ]
|
[ DEL ]
📄 deque
2,665 B
SET
[ EDIT ]
|
[ DEL ]
📄 exception
4,803 B
SET
[ EDIT ]
|
[ DEL ]
📄 fenv.h
2,020 B
SET
[ EDIT ]
|
[ DEL ]
📄 filesystem
1,438 B
SET
[ EDIT ]
|
[ DEL ]
📄 forward_list
1,577 B
SET
[ EDIT ]
|
[ DEL ]
📄 fstream
36,787 B
SET
[ EDIT ]
|
[ DEL ]
📄 functional
37,750 B
SET
[ EDIT ]
|
[ DEL ]
📄 future
50,678 B
SET
[ EDIT ]
|
[ DEL ]
📄 initializer_list
2,974 B
SET
[ EDIT ]
|
[ DEL ]
📄 iomanip
16,547 B
SET
[ EDIT ]
|
[ DEL ]
📄 ios
1,601 B
SET
[ EDIT ]
|
[ DEL ]
📄 iosfwd
6,918 B
SET
[ EDIT ]
|
[ DEL ]
📄 iostream
2,695 B
SET
[ EDIT ]
|
[ DEL ]
📄 istream
32,843 B
SET
[ EDIT ]
|
[ DEL ]
📄 iterator
2,644 B
SET
[ EDIT ]
|
[ DEL ]
📄 limits
69,181 B
SET
[ EDIT ]
|
[ DEL ]
📄 list
2,594 B
SET
[ EDIT ]
|
[ DEL ]
📄 locale
1,488 B
SET
[ EDIT ]
|
[ DEL ]
📄 map
2,559 B
SET
[ EDIT ]
|
[ DEL ]
📄 math.h
4,367 B
SET
[ EDIT ]
|
[ DEL ]
📄 memory
4,711 B
SET
[ EDIT ]
|
[ DEL ]
📄 mutex
18,224 B
SET
[ EDIT ]
|
[ DEL ]
📄 new
7,521 B
SET
[ EDIT ]
|
[ DEL ]
📄 numeric
5,444 B
SET
[ EDIT ]
|
[ DEL ]
📄 optional
43,963 B
SET
[ EDIT ]
|
[ DEL ]
📄 ostream
22,091 B
SET
[ EDIT ]
|
[ DEL ]
📄 queue
2,467 B
SET
[ EDIT ]
|
[ DEL ]
📄 random
1,692 B
SET
[ EDIT ]
|
[ DEL ]
📄 ratio
19,886 B
SET
[ EDIT ]
|
[ DEL ]
📄 regex
1,894 B
SET
[ EDIT ]
|
[ DEL ]
📄 scoped_allocator
16,221 B
SET
[ EDIT ]
|
[ DEL ]
📄 set
2,559 B
SET
[ EDIT ]
|
[ DEL ]
📄 shared_mutex
19,409 B
SET
[ EDIT ]
|
[ DEL ]
📄 sstream
26,871 B
SET
[ EDIT ]
|
[ DEL ]
📄 stack
2,391 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdexcept
7,975 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdlib.h
2,248 B
SET
[ EDIT ]
|
[ DEL ]
📄 streambuf
30,017 B
SET
[ EDIT ]
|
[ DEL ]
📄 string
1,940 B
SET
[ EDIT ]
|
[ DEL ]
📄 string_view
20,791 B
SET
[ EDIT ]
|
[ DEL ]
📄 system_error
11,522 B
SET
[ EDIT ]
|
[ DEL ]
📄 tgmath.h
1,360 B
SET
[ EDIT ]
|
[ DEL ]
📄 thread
10,519 B
SET
[ EDIT ]
|
[ DEL ]
📄 tuple
60,350 B
SET
[ EDIT ]
|
[ DEL ]
📄 type_traits
85,871 B
SET
[ EDIT ]
|
[ DEL ]
📄 typeindex
3,093 B
SET
[ EDIT ]
|
[ DEL ]
📄 typeinfo
7,692 B
SET
[ EDIT ]
|
[ DEL ]
📄 unordered_map
1,848 B
SET
[ EDIT ]
|
[ DEL ]
📄 unordered_set
1,847 B
SET
[ EDIT ]
|
[ DEL ]
📄 utility
12,303 B
SET
[ EDIT ]
|
[ DEL ]
📄 valarray
40,274 B
SET
[ EDIT ]
|
[ DEL ]
📄 variant
48,242 B
SET
[ EDIT ]
|
[ DEL ]
📄 vector
2,747 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: condition_variable
// <condition_variable> -*- C++ -*- // Copyright (C) 2008-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/condition_variable * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_CONDITION_VARIABLE #define _GLIBCXX_CONDITION_VARIABLE 1 #pragma GCC system_header #if __cplusplus < 201103L # include <bits/c++0x_warning.h> #else #include <chrono> #include <bits/std_mutex.h> #include <ext/concurrence.h> #include <bits/alloc_traits.h> #include <bits/allocator.h> #include <bits/unique_ptr.h> #include <bits/shared_ptr.h> #include <bits/cxxabi_forced.h> #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup condition_variables Condition Variables * @ingroup concurrency * * Classes for condition_variable support. * @{ */ /// cv_status enum class cv_status { no_timeout, timeout }; /// condition_variable class condition_variable { typedef chrono::system_clock __clock_t; typedef __gthread_cond_t __native_type; #ifdef __GTHREAD_COND_INIT __native_type _M_cond = __GTHREAD_COND_INIT; #else __native_type _M_cond; #endif public: typedef __native_type* native_handle_type; condition_variable() noexcept; ~condition_variable() noexcept; condition_variable(const condition_variable&) = delete; condition_variable& operator=(const condition_variable&) = delete; void notify_one() noexcept; void notify_all() noexcept; void wait(unique_lock<mutex>& __lock) noexcept; template<typename _Predicate> void wait(unique_lock<mutex>& __lock, _Predicate __p) { while (!__p()) wait(__lock); } template<typename _Duration> cv_status wait_until(unique_lock<mutex>& __lock, const chrono::time_point<__clock_t, _Duration>& __atime) { return __wait_until_impl(__lock, __atime); } template<typename _Clock, typename _Duration> cv_status wait_until(unique_lock<mutex>& __lock, const chrono::time_point<_Clock, _Duration>& __atime) { // DR 887 - Sync unknown clock to known clock. const typename _Clock::time_point __c_entry = _Clock::now(); const __clock_t::time_point __s_entry = __clock_t::now(); const auto __delta = __atime - __c_entry; const auto __s_atime = __s_entry + __delta; return __wait_until_impl(__lock, __s_atime); } template<typename _Clock, typename _Duration, typename _Predicate> bool wait_until(unique_lock<mutex>& __lock, const chrono::time_point<_Clock, _Duration>& __atime, _Predicate __p) { while (!__p()) if (wait_until(__lock, __atime) == cv_status::timeout) return __p(); return true; } template<typename _Rep, typename _Period> cv_status wait_for(unique_lock<mutex>& __lock, const chrono::duration<_Rep, _Period>& __rtime) { using __dur = typename __clock_t::duration; auto __reltime = chrono::duration_cast<__dur>(__rtime); if (__reltime < __rtime) ++__reltime; return wait_until(__lock, __clock_t::now() + __reltime); } template<typename _Rep, typename _Period, typename _Predicate> bool wait_for(unique_lock<mutex>& __lock, const chrono::duration<_Rep, _Period>& __rtime, _Predicate __p) { using __dur = typename __clock_t::duration; auto __reltime = chrono::duration_cast<__dur>(__rtime); if (__reltime < __rtime) ++__reltime; return wait_until(__lock, __clock_t::now() + __reltime, std::move(__p)); } native_handle_type native_handle() { return &_M_cond; } private: template<typename _Dur> cv_status __wait_until_impl(unique_lock<mutex>& __lock, const chrono::time_point<__clock_t, _Dur>& __atime) { auto __s = chrono::time_point_cast<chrono::seconds>(__atime); auto __ns = chrono::duration_cast<chrono::nanoseconds>(__atime - __s); __gthread_time_t __ts = { static_cast<std::time_t>(__s.time_since_epoch().count()), static_cast<long>(__ns.count()) }; __gthread_cond_timedwait(&_M_cond, __lock.mutex()->native_handle(), &__ts); return (__clock_t::now() < __atime ? cv_status::no_timeout : cv_status::timeout); } }; void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>); struct __at_thread_exit_elt { __at_thread_exit_elt* _M_next; void (*_M_cb)(void*); }; inline namespace _V2 { /// condition_variable_any // Like above, but mutex is not required to have try_lock. class condition_variable_any { typedef chrono::system_clock __clock_t; condition_variable _M_cond; shared_ptr<mutex> _M_mutex; // scoped unlock - unlocks in ctor, re-locks in dtor template<typename _Lock> struct _Unlock { explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); } ~_Unlock() noexcept(false) { if (uncaught_exception()) { __try { _M_lock.lock(); } __catch(const __cxxabiv1::__forced_unwind&) { __throw_exception_again; } __catch(...) { } } else _M_lock.lock(); } _Unlock(const _Unlock&) = delete; _Unlock& operator=(const _Unlock&) = delete; _Lock& _M_lock; }; public: condition_variable_any() : _M_mutex(std::make_shared<mutex>()) { } ~condition_variable_any() = default; condition_variable_any(const condition_variable_any&) = delete; condition_variable_any& operator=(const condition_variable_any&) = delete; void notify_one() noexcept { lock_guard<mutex> __lock(*_M_mutex); _M_cond.notify_one(); } void notify_all() noexcept { lock_guard<mutex> __lock(*_M_mutex); _M_cond.notify_all(); } template<typename _Lock> void wait(_Lock& __lock) { shared_ptr<mutex> __mutex = _M_mutex; unique_lock<mutex> __my_lock(*__mutex); _Unlock<_Lock> __unlock(__lock); // *__mutex must be unlocked before re-locking __lock so move // ownership of *__mutex lock to an object with shorter lifetime. unique_lock<mutex> __my_lock2(std::move(__my_lock)); _M_cond.wait(__my_lock2); } template<typename _Lock, typename _Predicate> void wait(_Lock& __lock, _Predicate __p) { while (!__p()) wait(__lock); } template<typename _Lock, typename _Clock, typename _Duration> cv_status wait_until(_Lock& __lock, const chrono::time_point<_Clock, _Duration>& __atime) { shared_ptr<mutex> __mutex = _M_mutex; unique_lock<mutex> __my_lock(*__mutex); _Unlock<_Lock> __unlock(__lock); // *__mutex must be unlocked before re-locking __lock so move // ownership of *__mutex lock to an object with shorter lifetime. unique_lock<mutex> __my_lock2(std::move(__my_lock)); return _M_cond.wait_until(__my_lock2, __atime); } template<typename _Lock, typename _Clock, typename _Duration, typename _Predicate> bool wait_until(_Lock& __lock, const chrono::time_point<_Clock, _Duration>& __atime, _Predicate __p) { while (!__p()) if (wait_until(__lock, __atime) == cv_status::timeout) return __p(); return true; } template<typename _Lock, typename _Rep, typename _Period> cv_status wait_for(_Lock& __lock, const chrono::duration<_Rep, _Period>& __rtime) { return wait_until(__lock, __clock_t::now() + __rtime); } template<typename _Lock, typename _Rep, typename _Period, typename _Predicate> bool wait_for(_Lock& __lock, const chrono::duration<_Rep, _Period>& __rtime, _Predicate __p) { return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); } }; } // end inline namespace // @} group condition_variables _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 #endif // C++11 #endif // _GLIBCXX_CONDITION_VARIABLE