Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

wefts_mutex.h

Go to the documentation of this file.
00001 /*
00002    wefts_mutex.h
00003    Mutex object header file.
00004 
00005    $Id: wefts_mutex.h,v 1.7 2003/12/14 09:07:55 jonnymind Exp $
00006 ---------------------------------------
00007    Begin      : 2003-08-02 23:31
00008    Author     : Giancarlo Niccolai
00009 
00010    Last modified because:
00011    Implementing OS independent base threading
00012 */
00013 
00014 /**************************************************************************
00015 *   This program is free software; you can redistribute it and/or modify  *
00016 *   it under the terms of the GNU Library General Public License as       *
00017 *   published by the Free Software Foundation; either version 2.1 of the  *
00018 *   License, or (at your option) any later version.                       *
00019 ***************************************************************************/
00020 
00021 #ifndef WT_MUTEX_H
00022 #define WT_MUTEX_H
00023 
00024 #include <wefts_os.h>
00025 
00026 namespace Wefts {
00027 
00040 class Mutex {
00041 protected:
00042    OSMutex   m_mutex;
00043 
00044    friend class Condition;
00045 public:
00047    Mutex(){}
00048 
00052    ~Mutex(){}
00053 
00058    virtual inline void lock() { m_mutex.lock(); }
00059 
00065    virtual inline bool trylock() { return m_mutex.trylock(); }
00066 
00072    virtual inline void unlock() { m_mutex.unlock(); }
00073 
00074 };
00075 
00076 }
00077 #endif
00078 /* end of wefts_mutex.h */

Generated on Mon Dec 22 04:12:30 2003 for Wefts by doxygen1.2.18