File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 66#include < limits>
77#include < type_traits>
88#include < utility>
9+ #include < cstdint>
910
1011// //////////////////////////////////////////////////////////////
1112// / Gives hint to processor that improves performance of spin-wait loops.
@@ -98,7 +99,7 @@ inline void sleep(K& k) {
9899namespace ipc {
99100
100101class spin_lock {
101- std::atomic<unsigned > lc_ { 0 };
102+ std::atomic<std:: uint32_t > lc_ { 0 };
102103
103104public:
104105 void lock (void ) noexcept {
@@ -113,13 +114,13 @@ class spin_lock {
113114};
114115
115116class rw_lock {
116- using lc_ui_t = unsigned ;
117+ using lc_ui_t = std:: uint32_t ;
117118
118119 std::atomic<lc_ui_t > lc_ { 0 };
119120
120121 enum : lc_ui_t {
121- w_mask = (std::numeric_limits<std::make_signed_t <lc_ui_t >>::max)(), // b 0111 1111
122- w_flag = w_mask + 1 // b 1000 0000
122+ w_mask = (std::numeric_limits<std::make_signed_t <lc_ui_t >>::max)(), // b 0111 1111 ...
123+ w_flag = w_mask + 1 // b 1000 0000 ...
123124 };
124125
125126public:
You can’t perform that action at this time.
0 commit comments