StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
msgQPLib.h
1 #ifndef _MSG_QP_LIB_H_
2 #define _MSG_QP_LIB_H_
3 
4 #define MSG_Q_MAXQUEUES 256
5 
6 
7 #define WAIT_FOREVER (-1)
8 #define NO_WAIT 0
9 #define S_objLib_OBJ_TIMEOUT EAGAIN
10 #define MSG_PRI_NORMAL 1
11 
12 #define MSG_Q_TIMEOUT (-1)
13 #define MSG_Q_ERROR (-2) // OS-specific error i.e. write return!
14 #define MSG_Q_NOTASK (-3) // "no task present" error
15 
16 #define MSG_R_BLOCK 0x01
17 #define MSG_W_BLOCK 0x02
18 #define MSG_D_BLOCK (MSG_R_BLOCK) // default
19 
20 
21 // look at the defaults! They are as Jeff suggested.
22 
23 extern int msgQPCreate(int task, int msgnum, int msglen, int block = MSG_D_BLOCK, int create = 0) ;
24 extern int msgQPSend(int task, char *what, int size, int timeout = NO_WAIT, int prio = MSG_PRI_NORMAL) ;
25 extern int msgQPReceive(int task, char *where, int size, int timeout = WAIT_FOREVER) ;
26 extern int msgQPClose(int task) ;
27 extern int msgQPDelete(int task) ;
28 
29 #endif