Xenomai  3.0.8
msgQLib.h
1 /*
2  * Copyright (C) 2008 Philippe Gerum <rpm@xenomai.org>.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13 
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  *
18  * This file satisfies the references within the emulator code
19  * mimicking a VxWorks-like API built upon the copperplate library.
20  *
21  * VxWorks is a registered trademark of Wind River Systems, Inc.
22  */
23 
24 #ifndef _XENOMAI_VXWORKS_MSGQLIB_H
25 #define _XENOMAI_VXWORKS_MSGQLIB_H
26 
27 #include <vxworks/types.h>
28 
29 typedef uintptr_t MSG_Q_ID;
30 
31 #define MSG_PRI_NORMAL 0
32 #define MSG_PRI_URGENT 1
33 
34 #define MSG_Q_FIFO 0x0
35 #define MSG_Q_PRIORITY 0x1
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 MSG_Q_ID msgQCreate(int maxMsgs, int maxMsgLength, int options);
42 
43 STATUS msgQDelete(MSG_Q_ID msgQId);
44 
45 int msgQNumMsgs(MSG_Q_ID msgQId);
46 
47 int msgQReceive(MSG_Q_ID msgQId, char *buf, UINT bytes, int timeout);
48 
49 STATUS msgQSend(MSG_Q_ID msgQId, const char *buf, UINT bytes,
50  int timeout, int prio);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* !_XENOMAI_VXWORKS_MSGQLIB_H */