Changeset 4bea22a in mainline
- Timestamp:
- 2018-07-05T21:41:20Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 69e5838
- Parents:
- 40340461
- git-author:
- Dzejrou <dzejrou@…> (2018-03-28 14:26:30)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/internal/runtime.cpp
r40340461 r4bea22a 31 31 #include <internal/abi.hpp> 32 32 #include <exception> 33 #include <mutex> 33 34 34 35 namespace __cxxabiv1 … … 119 120 } 120 121 122 using guard_t = std::uint64_t; 123 std::mutex static_guard_mtx{}; 124 125 extern "C" int __cxa_guard_acquire(guard_t* guard) 126 { 127 static_guard_mtx.lock(); 128 129 return !*((std::uint8_t*)guard); 130 } 131 132 extern "C" void __cxa_guard_release(guard_t* guard) 133 { 134 *((std::uint8_t*)guard) = 1; 135 136 static_guard_mtx.unlock(); 137 } 138 139 extern "C" void __cxa_guard_abort(guard_t* guard) 140 { 141 static_guard_mtx.unlock(); 142 } 143 121 144 __fundamental_type_info::~__fundamental_type_info() 122 145 { /* DUMMY BODY */ }
Note:
See TracChangeset
for help on using the changeset viewer.