MutexImplLxrt38.cpp
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 //----------------------------------------------------------------------
00011 //----------------------------------------------------------------------
00012 #include "icl_core_thread/MutexImplLxrt38.h"
00013 
00014 #include <icl_core/internal_raw_debug.h>
00015 #include <icl_core/os_lxrt.h>
00016 
00017 #include "icl_core_thread/Common.h"
00018 
00019 #define STRICT_LXRT_CHECKS
00020 
00021 
00022 namespace icl_core {
00023 namespace thread {
00024 
00025 MutexImplLxrt38::MutexImplLxrt38()
00026   : m_sem(1, BIN_SEM)
00027 {
00028 }
00029 
00030 MutexImplLxrt38::~MutexImplLxrt38()
00031 {
00032 }
00033 
00034 bool MutexImplLxrt38::lock()
00035 {
00036   return m_sem.wait();
00037 }
00038 
00039 bool MutexImplLxrt38::lock(const icl_core::TimeSpan& timeout)
00040 {
00041   return m_sem.wait(timeout);
00042 }
00043 
00044 bool MutexImplLxrt38::lock(const icl_core::TimeStamp& timeout)
00045 {
00046   return m_sem.wait(timeout);
00047 }
00048 
00049 bool MutexImplLxrt38::tryLock()
00050 {
00051   return m_sem.tryWait();
00052 }
00053 
00054 void MutexImplLxrt38::unlock()
00055 {
00056   m_sem.post();
00057 }
00058 
00059 }
00060 }


schunk_svh_driver
Author(s): Georg Heppner
autogenerated on Fri Aug 28 2015 12:59:19