/usr/include/xenomai/psos+/queue.h is in libxenomai-dev 2.5.5.2-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | /*
* Copyright (C) 2001,2002,2003 Philippe Gerum <rpm@xenomai.org>.
*
* Xenomai is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* Xenomai is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Xenomai; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef _PSOS_QUEUE_H
#define _PSOS_QUEUE_H
#include <psos+/defs.h>
#include <psos+/psos.h>
#include <psos+/ppd.h>
#define PSOS_QUEUE_MAGIC 0x81810303
/* These flags are cumulative with standard queue creation flags */
#define Q_VARIABLE XNSYNCH_SPARE0 /* Variable-size elements */
#define Q_NOCACHE XNSYNCH_SPARE1 /* No mbuf cache -- use region #0 */
#define Q_PRIVCACHE XNSYNCH_SPARE2 /* Use queue's private mbuf cache */
#define Q_SHAREDINIT XNSYNCH_SPARE3 /* Init private cache from shared pool */
#define Q_INFINITE XNSYNCH_SPARE4 /* Infinite queue element count */
#define Q_JAMMED XNSYNCH_SPARE5 /* Queue is currently jammed */
#define PSOS_QUEUE_MIN_ALLOC 64
typedef struct psosmbuf {
xnholder_t link;
#define link2psosmbuf(ln) container_of(ln, psosmbuf_t, link)
u_long len;
char data[1];
} psosmbuf_t;
typedef struct psosqueue {
unsigned magic; /* Magic code - must be first */
xnholder_t link; /* Link in psosqueueq */
char name[XNOBJECT_NAME_LEN];
xnhandle_t handle;
#define link2psosqueue(ln) container_of(ln, psosqueue_t, link)
xnqueue_t chunkq; /* Chunks used for the private queue */
xnsynch_t synchbase;
#define synch2psosqueue(ln) ((ln) ? container_of(ln, psosqueue_t, synchbase) : NULL)
u_long maxnum,
maxlen;
xnqueue_t inq, /* Incoming message queue */
freeq; /* Free (cache) message queue */
xnholder_t rlink; /* !< Link in resource queue. */
#define rlink2q(ln) container_of(ln, psosqueue_t, rlink)
xnqueue_t *rqueue; /* !< Backpointer to resource queue. */
} psosqueue_t;
#ifdef __cplusplus
extern "C" {
#endif
void psosqueue_init(void);
void psosqueue_cleanup(void);
static inline void psos_queue_flush_rq(xnqueue_t *rq)
{
psos_flush_rq(psosqueue_t, rq, q);
}
#ifdef __cplusplus
}
#endif
#endif /* !_PSOS_QUEUE_H */
|