Xenomai
3.1
queue.h
1
/*
2
* Copyright (C) 2011 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
19
#ifndef _ALCHEMY_QUEUE_H
20
#define _ALCHEMY_QUEUE_H
21
22
#include <boilerplate/list.h>
23
#include <copperplate/syncobj.h>
24
#include <copperplate/registry.h>
25
#include <copperplate/cluster.h>
26
#include <copperplate/heapobj.h>
27
#include <alchemy/queue.h>
28
29
struct
alchemy_queue {
30
unsigned
int
magic;
/* Must be first. */
31
char
name[XNOBJECT_NAME_LEN];
32
int
mode;
33
size_t
limit;
34
struct
heapobj hobj;
35
struct
syncobj sobj;
36
struct
clusterobj cobj;
37
struct
listobj mq;
38
unsigned
int
mcount;
39
struct
fsobj fsobj;
40
};
41
42
#define queue_magic 0x8787ebeb
43
44
struct
alchemy_queue_msg {
45
size_t
size;
46
unsigned
int
refcount;
47
struct
holder next;
48
/* Payload data follows. */
49
};
50
51
struct
alchemy_queue_wait {
52
dref_type(
struct
alchemy_queue_msg *) msg;
53
void
*local_buf;
54
size_t
local_bufsz;
55
};
56
57
extern
struct
syncluster alchemy_queue_table;
58
59
#endif
/* _ALCHEMY_QUEUE_H */
lib
alchemy
queue.h
Generated by
1.8.14