Changeset 5e5498e 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:
ecb072d
Parents:
a75f3e49
git-author:
Dzejrou <dzejrou@…> (2018-03-02 20:23:47)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
Message:

cpp: bugfixes

Location:
uspace/lib/cpp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/Makefile

    ra75f3e49 r5e5498e  
    4242        src/iostream.cpp \
    4343        src/locale.cpp \
     44        src/mutex.cpp \
    4445        src/new.cpp \
    4546        src/string.cpp \
  • uspace/lib/cpp/include/impl/mutex.hpp

    ra75f3e49 r5e5498e  
    3030#define LIBCPP_MUTEX
    3131
     32#include <internal/common.hpp>
    3233#include <thread>
    33 
    34 extern "C" {
    35 #include <fibril_synch.h>
    36 }
    3734
    3835namespace std
    3936{
     37    extern "C" {
     38    #include <fibril.h>
     39    #include <fibril_synch.h>
     40    }
     41
    4042    /**
    4143     * 20.4.1.2.1, class mutex:
  • uspace/lib/cpp/include/impl/thread.hpp

    ra75f3e49 r5e5498e  
    3434#include <ostream>
    3535
    36 extern "C" {
    37     #include <fibril.h>
    38     #include <fibril_synch.h>
    39 }
    40 
    4136namespace std
    4237{
     38    extern "C" {
     39        #include <fibril.h>
     40        #include <fibril_synch.h>
     41    }
     42
    4343    namespace aux
    4444    {
     
    225225            auto usecs = chrono::duration_cast<chrono::duration<typename Duration::rep, micro>>(abs_time - now);
    226226
    227             std::fibril_usleep(usecs.count());
     227            fibril_usleep(usecs.count());
    228228        }
    229229
     
    236236            // TODO: timeouts?
    237237            auto usecs = chrono::duration_cast<chrono::duration<Rep, micro>>(rel_time);
    238             std::fibril_usleep(usecs.count());
     238            fibril_usleep(usecs.count());
    239239        }
    240240    }
     
    246246    {
    247247        public:
    248             id() noexcept
     248            constexpr id() noexcept
    249249                : id_{}
    250250            { /* DUMMY BODY */ }
  • uspace/lib/cpp/src/mutex.cpp

    ra75f3e49 r5e5498e  
    3131namespace std
    3232{
    33     mutex::mutex()
     33    constexpr mutex::mutex() noexcept
    3434        : mtx_{}
    3535    {
     
    7171    }
    7272
    73     recursive_mutex::recursive_mutex()
     73    constexpr recursive_mutex::recursive_mutex() noexcept
    7474        : mtx_{}, lock_level_{}, owner_{}
    7575    {
Note: See TracChangeset for help on using the changeset viewer.