Skip to content

Commit

Permalink
updated stdc++ for gcc 13
Browse files Browse the repository at this point in the history
  • Loading branch information
rajszym committed Apr 20, 2024
1 parent 2325e16 commit 1fbf8d1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
32 changes: 18 additions & 14 deletions stateos/stdc++/bits/gthr-default.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@
#include "inc/osmutex.h"
#include "inc/osonceflag.h"
#include "inc/osconditionvariable.h"
#include "inc/critical_section.hh"
#include "inc/chrono.hh"

#if !__cpp_lib_atomic_wait || !__cpp_aligned_new
#include "inc/barrier.hh"
#endif

#if !__cpp_lib_atomic_wait
#include "inc/latch.hh"
#endif

#if !__cpp_lib_atomic_wait && !_GLIBCXX_HAVE_POSIX_SEMAPHORE
#include "inc/semaphore.hh"
#endif

//-----------------------------------------------------------------------------

Expand All @@ -67,6 +53,7 @@
#define __GTHREADS_CXX0X 1
#define __GTHREAD_HAS_COND 1
#define _GLIBCXX_HAVE_TLS 1
#define _GLIBCXX_THREAD_IMPL 1
#define _GLIBCXX_USE_SCHED_YIELD 1
#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1

Expand All @@ -89,6 +76,9 @@ typedef ostime_t __gthread_time_t;
#define __GTHREAD_RECURSIVE_MUTEX_INIT _MTX_INIT(mtxPrioInherit|mtxRecursive, 0)
#define __GTHREAD_COND_INIT _CND_INIT()

#include "inc/critical_section.hh"
#include "inc/chrono.hh"

//-----------------------------------------------------------------------------
extern "C"
{
Expand Down Expand Up @@ -301,4 +291,18 @@ int __gthread_setspecific(__gthread_key_t key, const void *ptr);
} // extern "C"
//-----------------------------------------------------------------------------

#if !__cpp_lib_atomic_wait || !__cpp_aligned_new
#include "inc/barrier.hh"
#endif

#if !__cpp_lib_atomic_wait
#include "inc/latch.hh"
#endif

#if !__cpp_lib_atomic_wait && !_GLIBCXX_HAVE_POSIX_SEMAPHORE
#include "inc/semaphore.hh"
#endif

//-----------------------------------------------------------------------------

#endif //_GLIBCXX_GCC_GTHR_STATEOS_H
4 changes: 4 additions & 0 deletions stateos/stdc++/inc/chrono.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
#define __STATEOS_CHRONO_HH

#include "inc/osclock.h"
#if __GNUC__ < 12
#include <chrono>
#else
#include <bits/chrono.h>
#endif

namespace std {
namespace chrono {
Expand Down

0 comments on commit 1fbf8d1

Please sign in to comment.