Changeset b3b8405 in mainline for uspace/lib/cpp/src/mutex.cpp


Ignore:
Timestamp:
2018-07-05T21:41:24Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8a8a9273
Parents:
a6139852
git-author:
Dzejrou <dzejrou@…> (2018-06-25 15:20:35)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:24)
Message:

cpp: split <mutex> into <mutex> and <shared_mutex>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/src/mutex.cpp

    ra6139852 rb3b8405  
    173173        return &mtx_;
    174174    }
    175 
    176     shared_timed_mutex::shared_timed_mutex() noexcept
    177         : mtx_{}
    178     {
    179         aux::threading::shared_mutex::init(mtx_);
    180     }
    181 
    182     shared_timed_mutex::~shared_timed_mutex()
    183     { /* DUMMY BODY */ }
    184 
    185     void shared_timed_mutex::lock()
    186     {
    187         aux::threading::shared_mutex::lock(mtx_);
    188     }
    189 
    190     bool shared_timed_mutex::try_lock()
    191     {
    192         return aux::threading::shared_mutex::try_lock(mtx_);
    193     }
    194 
    195     void shared_timed_mutex::unlock()
    196     {
    197         aux::threading::shared_mutex::unlock(mtx_);
    198     }
    199 
    200     void shared_timed_mutex::lock_shared()
    201     {
    202         aux::threading::shared_mutex::lock_shared(mtx_);
    203     }
    204 
    205     bool shared_timed_mutex::try_lock_shared()
    206     {
    207         return aux::threading::shared_mutex::try_lock_shared(mtx_);
    208     }
    209 
    210     void shared_timed_mutex::unlock_shared()
    211     {
    212         aux::threading::shared_mutex::unlock_shared(mtx_);
    213     }
    214 
    215     shared_timed_mutex::native_handle_type shared_timed_mutex::native_handle()
    216     {
    217         return &mtx_;
    218     }
    219175}
Note: See TracChangeset for help on using the changeset viewer.