Mutex.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  Mutex.cpp
00003  *
00004  *  (C) 2006 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  *  Information on Code Review state:
00008  *  §Author: R5; DevelTest: Date; Reviewer: R5; Review: Date; State: OK§
00009  *
00010  *  Additional information:
00011  *  $Id: Mutex.cpp 44313 2011-04-06 22:46:28Z agas $
00012  ******************************************************************************/
00013 
00014 
00015 #include "Mutex.h"
00016 
00017 Mutex::Mutex()
00018 {
00019         m_Mutex = new TMutex;
00020         pthread_mutex_init ( m_Mutex, NULL );
00021 }
00022 
00023 
00024 Mutex::~Mutex()
00025 {
00026         pthread_mutex_destroy ( m_Mutex );
00027         delete m_Mutex;
00028 }
00029 
00030 
00031 void Mutex::lock ()
00032 {
00033         pthread_mutex_lock ( m_Mutex );
00034 }
00035 
00036 
00037 void Mutex::unlock()
00038 {
00039         pthread_mutex_unlock ( m_Mutex );
00040 }
00041 
00042 
00043 TMutex* Mutex::getMutex()
00044 {
00045         return m_Mutex;
00046 }
00047 
00048 #ifdef __TEST__
00049 
00050 #include <iostream>
00051 
00052 int main ( int argc, char **argv )
00053 {
00054         std::cout << "UNITTEST" << std::endl;
00055         return 0;
00056 }
00057 #endif


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09