source: flair-src/trunk/lib/FlairCore/src/Semaphore.cpp @ 124

Last change on this file since 124 was 118, checked in by Sanahuja Guillaume, 5 years ago

aded semaphore
resolved bug for rt_printf before thread is started

File size: 959 bytes
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5//  created:    2016/11/16
6//  filename:   Semaphore.cpp
7//
8//  author:     Thomas Fuhrmann
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining a semaphore
14//
15//
16/*********************************************************************/
17
18#include "Semaphore.h"
19#include "Semaphore_impl.h"
20
21using std::string;
22
23namespace flair {
24namespace core {
25
26Semaphore::Semaphore(const Object *parent, uint32_t initialValue, string name)
27    : Object(parent, name, "semaphore") {
28  pimpl_ = new Semaphore_impl(this, initialValue);
29}
30
31Semaphore::~Semaphore() { delete pimpl_; }
32
33void Semaphore::GetSemaphore(void) const { pimpl_->GetSemaphore(); }
34
35void Semaphore::ReleaseSemaphore(void) const { pimpl_->ReleaseSemaphore(); }
36
37} // end namespace core
38} // end namespace flair
Note: See TracBrowser for help on using the repository browser.