12 #include <sys/types.h>
17 #define DT_QCONTROL_VALID 0
18 #define DT_QCONTROL_DEAD_SPACE 1
19 #define DT_QCONTROL_END 2
21 #define DtSMQFrontLockSem 0
22 #define DtSMQPacketCountSem 1
28 #define DtSMQByteCountSem 0
30 #define DtCsSemaphoresUsed 2
32 #define DtSMQDontGoYet 0
33 #define DtSMQIAmGoingAway 1
34 #define DtSMQYouMustGoAway 2
36 #define DtSMQExternal 0
37 #define DtSMQInternal 1
39 #ifdef DtUSE_UTILITIES_NAMESPACE
40 namespace DtUSE_UTILITIES_NAMESPACE
65 unsigned char internal;
91 bool pleaseInit,
bool dropOldest);
96 { queue->hdr.blockingRead = mode ? 1 : 0; }
99 { queue->hdr.blockingWrite = mode ? 1 : 0; }
102 {
return queue->hdr.blockingRead ?
true :
false; }
105 {
return queue->hdr.blockingWrite ?
true :
false; }
108 {
return queue->hdr.dropOldest ?
true :
false; }
112 DtU32 notifyReader();
118 int lockFront(
int wait);
119 void unlockFront(
void);
121 void incrPacketCount(
int amount);
122 void incrByteCount(
int amount);
123 void decrByteCount(
int amount);
124 void decrPacketCount(
int amount);
128 void setFront(
int newFront) { queue->hdr.front = newFront; }
131 void setGoAway(
int reason) { queue->hdr.goAway = reason; }
134 { queue->hdr.dropOldest = mode ? 1 : 0; }
137 bool isInternal() {
return queue->hdr.internal ?
true :
false; }
149 struct sembuf testAndSetLock;
150 struct sembuf clearLock;
151 struct sembuf addBytes;
152 struct sembuf subBytes;
153 struct sembuf addPackets;
154 struct sembuf subPackets;
159 #ifdef DtUSE_UTILITIES_NAMESPACE
void setFront(int newFront)
Definition: vlShmQueue.h:128
Definition: vlShmQueue.h:75
DtU16 padding1
Definition: vlShmQueue.h:66
short read
Definition: vlShmQueue.h:46
unsigned char dropOldest
Definition: vlShmQueue.h:70
struct Dt_Msg_Queue_Element DtMsgQueueElement
struct Dt_Shm_Msg_Queue DtShmMsgQueue
unsigned char padding2
Definition: vlShmQueue.h:71
short control
Definition: vlShmQueue.h:47
bool isBlockingRead()
Definition: vlShmQueue.h:101
void setNotifyReader(DtU32 count)
Definition: vlShmQueue.h:114
unsigned char blockingWrite
Definition: vlShmQueue.h:69
struct Dt_Q_Hdr DtShmQueueHdr
DtQueueElementHdr hdr
Definition: vlShmQueue.h:53
void setBlockingWrite(bool mode)
Definition: vlShmQueue.h:98
bool isInternal()
Definition: vlShmQueue.h:137
void setInternal(int mode)
Definition: vlShmQueue.h:136
bool isDropOldest()
Definition: vlShmQueue.h:107
DtU32 notifyReader
Definition: vlShmQueue.h:61
int getPhysEnd()
Definition: vlShmQueue.h:126
Definition: vlShmQueue.h:44
DtShmMsgQueue * queue
Definition: vlShmQueue.h:145
Definition: vlShmQueue.h:83
bool isBlockingWrite()
Definition: vlShmQueue.h:104
unsigned char blockingRead
Definition: vlShmQueue.h:68
int size
Definition: vlShmQueue.h:48
DtInt32 front
Definition: vlShmQueue.h:60
Definition: vlShmReader.h:43
Definition: vlShmWriter.h:30
DtShmQueueHdr hdr
Definition: vlShmQueue.h:77
struct Dt_Q_Elmt_Hdr DtQueueElementHdr
int physEnd
Definition: vlShmQueue.h:146
void setDropOldest(bool mode)
Definition: vlShmQueue.h:133
int getFront()
Definition: vlShmQueue.h:129
DtMsgQueueElement * getQueueElement(int i)
Definition: vlShmQueue.h:139
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
Definition: vlShmQueue.h:51
Definition: vlShmQueue.h:58
int getGoAway()
Definition: vlShmQueue.h:110
char data[8]
Definition: vlShmQueue.h:54
int semid
Definition: vlShmQueue.h:147
long int DtInt32
A 32 bit integer value.
Definition: vlMachineTypes.h:156
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:153
This file contains typedefs for machine dependant types.
void setBlockingRead(bool mode)
Definition: vlShmQueue.h:95
unsigned char goAway
Messages read by the reader.
Definition: vlShmQueue.h:64
void setGoAway(int reason)
Definition: vlShmQueue.h:131
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109