Changeset ecb072d in mainline


Ignore:
Timestamp:
2018-07-05T21:41:20Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
392b0ab3
Parents:
5e5498e
git-author:
Dzejrou <dzejrou@…> (2018-03-03 02:56:48)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
Message:

cpp: mutex native handles are now pointers so that we avoid copying on retrieval

Location:
uspace/lib/cpp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/impl/mutex.hpp

    r5e5498e recb072d  
    3636{
    3737    extern "C" {
    38     #include <fibril.h>
    39     #include <fibril_synch.h>
     38        #include <fibril.h>
     39        #include <fibril_synch.h>
    4040    }
    4141
     
    5757            void unlock();
    5858
    59             using native_handle_type = fibril_mutex_t;
     59            using native_handle_type = fibril_mutex_t*;
    6060            native_handle_type native_handle();
    6161
     
    8181            void unlock();
    8282
    83             using native_handle_type = fibril_mutex_t;
     83            using native_handle_type = fibril_mutex_t*;
    8484            native_handle_type native_handle();
    8585
  • uspace/lib/cpp/src/mutex.cpp

    r5e5498e recb072d  
    6868    mutex::native_handle_type mutex::native_handle()
    6969    {
    70         return mtx_;
     70        return &mtx_;
    7171    }
    7272
     
    121121    recursive_mutex::native_handle_type recursive_mutex::native_handle()
    122122    {
    123         return mtx_;
     123        return &mtx_;
    124124    }
    125125}
Note: See TracChangeset for help on using the changeset viewer.