Queue.hpp
00001
00002 #ifndef ORO_QUEUE_HPP
00003 #define ORO_QUEUE_HPP
00004
00005 #include "rtt-config.h"
00006
00012 #if defined(OROBLD_OS_NO_ASM)
00013 #include "LockedQueue.hpp"
00014 #else
00015 #include "AtomicQueue.hpp"
00016 #endif
00017
00018 namespace RTT
00019 {
00024 template< class T, class ReadPolicy = NonBlockingPolicy, class WritePolicy = NonBlockingPolicy>
00025 class Queue
00026 #if defined(OROBLD_OS_NO_ASM)
00027 : public LockedQueue<T,ReadPolicy,WritePolicy>
00028 #else
00029 : public AtomicQueue<T,ReadPolicy,WritePolicy>
00030 #endif
00031 {
00032 public:
00038 Queue( int qsize, int t = ORONUM_OS_MAX_THREADS)
00039 #if defined(OROBLD_OS_NO_ASM)
00040 : LockedQueue<T,ReadPolicy,WritePolicy>(qsize,t)
00041 #else
00042 : AtomicQueue<T,ReadPolicy,WritePolicy>(qsize,t)
00043 #endif
00044 {}
00045 };
00046 }
00047
00048 #endif