Changeset befead8 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:20Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
857d4cc
Parents:
55aa951
git-author:
Dzejrou <dzejrou@…> (2018-03-28 20:41:19)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
Message:

cpp: added missing implementation for timed_mutex

File:
1 edited

Legend:

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

    r55aa951 rbefead8  
    5454    }
    5555
    56     constexpr recursive_mutex::recursive_mutex() noexcept
    57         : mtx_{}, lock_level_{}, owner_{}
    58     {
    59         aux::threading::mutex::init(mtx_);
    60     }
    61 
    6256    recursive_mutex::~recursive_mutex()
    6357    { /* DUMMY BODY */ }
     
    106100        return &mtx_;
    107101    }
     102
     103    timed_mutex::timed_mutex() noexcept
     104        : mtx_{}
     105    {
     106        aux::threading::mutex::init(mtx_);
     107    }
     108
     109    timed_mutex::~timed_mutex()
     110    { /* DUMMY BODY */ }
     111
     112    void timed_mutex::lock()
     113    {
     114        aux::threading::mutex::lock(mtx_);
     115    }
     116
     117    bool timed_mutex::try_lock()
     118    {
     119        return aux::threading::mutex::try_lock(mtx_);
     120    }
     121
     122    void timed_mutex::unlock()
     123    {
     124        aux::threading::mutex::unlock(mtx_);
     125    }
     126
     127    timed_mutex::native_handle_type timed_mutex::native_handle()
     128    {
     129        return &mtx_;
     130    }
    108131}
Note: See TracChangeset for help on using the changeset viewer.