Changeset 9283830 in mainline for uspace/lib/cpp/include/impl/mutex.hpp
- 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:
- 7e7c1aac
- Parents:
- c4049e6
- git-author:
- Dzejrou <dzejrou@…> (2018-03-28 14:21:53)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/mutex.hpp
rc4049e6 r9283830 31 31 32 32 #include <internal/common.hpp> 33 #include <internal/thread.hpp> 33 34 #include <thread> 34 35 35 36 namespace std 36 37 { 37 extern "C" {38 #include <fibril.h>39 #include <fibril_synch.h>40 }41 42 38 /** 43 39 * 20.4.1.2.1, class mutex: … … 47 43 { 48 44 public: 49 constexpr mutex() noexcept; 45 constexpr mutex() noexcept 46 : mtx_{} 47 { 48 aux::threading::mutex::init(mtx_); 49 } 50 50 51 ~mutex(); 51 52 … … 57 58 void unlock(); 58 59 59 using native_handle_type = fibril_mutex_t*;60 using native_handle_type = aux::mutex_t*; 60 61 native_handle_type native_handle(); 61 62 62 63 private: 63 native_handle_typemtx_;64 aux::mutex_t mtx_; 64 65 }; 65 66 … … 81 82 void unlock(); 82 83 83 using native_handle_type = fibril_mutex_t*;84 using native_handle_type = aux::mutex_t*; 84 85 native_handle_type native_handle(); 85 86 86 87 private: 87 native_handle_typemtx_;88 aux::mutex_t mtx_; 88 89 size_t lock_level_; 89 90 thread::id owner_;
Note:
See TracChangeset
for help on using the changeset viewer.