Monitor.h File Reference

#include "ApparatusFramework/KernelServices/Mutex.h"
#include "ApparatusFramework/KernelServices/Guard.h"

Go to the source code of this file.

Classes

class  ApparatusFramework::Monitor

Namespaces

namespace  ApparatusFramework

Defines

#define monitorEntry()   Guard guard(m_mutex)
#define monitorExit()   guard.put()
#define monitorExitWithValue(data)   return (data)

Define Documentation

 
#define monitorEntry (  )     Guard guard(m_mutex)

modifiers Serializes the accesss to the monitor. If the monitor is occupied, the task is suspended and added to the list of waiting clients. Upon monitor exit, the next waiting client is waked up.

Definition at line 85 of file Monitor.h.

Referenced by ApparatusFramework::Stub< maxLogSize >::clearLog(), and ApparatusFramework::Stub< maxLogSize >::getLogBuffer().

 
#define monitorExit (  )     guard.put()

Realeases the access to the monitor. The next waiting client is waken up and the monitor is again occupied. If no client is waiting the monitor is free for the next client.

Definition at line 91 of file Monitor.h.

Referenced by ApparatusFramework::Stub< maxLogSize >::clearLog().

#define monitorExitWithValue ( data   )     return (data)

Returns with a value and realeases the access to the monitor when the guard object goes out of scope. The next waiting client is waken up and the monitor is again occupied. If no client is waiting the monitor is free for the next client.

Definition at line 98 of file Monitor.h.

Referenced by ApparatusFramework::Stub< maxLogSize >::getLogBuffer().

© 2004-2010 bbv Software Services AG / Apparatus Services