Module: xenomai-3
Branch: master
Commit: 62e36a36382ffc29a22bdb53b4258eda947fbaff
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=62e36a36382ffc29a22bdb53b4258eda947fbaff

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Oct 30 12:09:00 2014 +0100

cobalt/pipe: introduce uapi/ section

---

 include/cobalt/kernel/pipe.h           |   16 +-------------
 include/cobalt/uapi/kernel/Makefile.am |    1 +
 include/cobalt/uapi/kernel/Makefile.in |    1 +
 include/cobalt/uapi/kernel/pipe.h      |   37 ++++++++++++++++++++++++++++++++
 include/rtdm/uapi/ipc.h                |    1 +
 5 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/include/cobalt/kernel/pipe.h b/include/cobalt/kernel/pipe.h
index b781f71..01b4642 100644
--- a/include/cobalt/kernel/pipe.h
+++ b/include/cobalt/kernel/pipe.h
@@ -23,25 +23,11 @@
 #include <linux/poll.h>
 #include <cobalt/kernel/synch.h>
 #include <cobalt/kernel/thread.h>
+#include <cobalt/uapi/kernel/pipe.h>
 
 #define XNPIPE_NDEVS      CONFIG_XENO_OPT_PIPE_NRDEV
 #define XNPIPE_DEV_MAJOR  150
 
-#define        XNPIPE_IOCTL_BASE       'p'
-#define XNPIPEIOC_GET_NRDEV    _IOW(XNPIPE_IOCTL_BASE, 0, int)
-#define XNPIPEIOC_IFLUSH       _IO(XNPIPE_IOCTL_BASE,1)
-#define XNPIPEIOC_OFLUSH       _IO(XNPIPE_IOCTL_BASE,2)
-#define XNPIPEIOC_FLUSH                XNPIPEIOC_OFLUSH
-#define XNPIPEIOC_SETSIG       _IO(XNPIPE_IOCTL_BASE,3)
-
-#define XNPIPE_NORMAL  0x0
-#define XNPIPE_URGENT  0x1
-
-#define XNPIPE_IFLUSH  0x1
-#define XNPIPE_OFLUSH  0x2
-
-#define XNPIPE_MINOR_AUTO  -1
-
 #define XNPIPE_KERN_CONN         0x1
 #define XNPIPE_KERN_LCLOSE       0x2
 #define XNPIPE_USER_CONN         0x4
diff --git a/include/cobalt/uapi/kernel/Makefile.am 
b/include/cobalt/uapi/kernel/Makefile.am
index e98a735..12e1b37 100644
--- a/include/cobalt/uapi/kernel/Makefile.am
+++ b/include/cobalt/uapi/kernel/Makefile.am
@@ -3,6 +3,7 @@ includesubdir = $(includedir)/cobalt/uapi/kernel
 includesub_HEADERS =   \
        heap.h          \
        limits.h        \
+       pipe.h          \
        synch.h         \
        thread.h        \
        trace.h         \
diff --git a/include/cobalt/uapi/kernel/Makefile.in 
b/include/cobalt/uapi/kernel/Makefile.in
index 0edff6d..11f9251 100644
--- a/include/cobalt/uapi/kernel/Makefile.in
+++ b/include/cobalt/uapi/kernel/Makefile.in
@@ -336,6 +336,7 @@ includesubdir = $(includedir)/cobalt/uapi/kernel
 includesub_HEADERS = \
        heap.h          \
        limits.h        \
+       pipe.h          \
        synch.h         \
        thread.h        \
        trace.h         \
diff --git a/include/cobalt/uapi/kernel/pipe.h 
b/include/cobalt/uapi/kernel/pipe.h
new file mode 100644
index 0000000..688ee0c
--- /dev/null
+++ b/include/cobalt/uapi/kernel/pipe.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 Philippe Gerum <r...@xenomai.org>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+#ifndef _COBALT_UAPI_KERNEL_PIPE_H
+#define _COBALT_UAPI_KERNEL_PIPE_H
+
+#define        XNPIPE_IOCTL_BASE       'p'
+
+#define XNPIPEIOC_GET_NRDEV    _IOW(XNPIPE_IOCTL_BASE, 0, int)
+#define XNPIPEIOC_IFLUSH       _IO(XNPIPE_IOCTL_BASE, 1)
+#define XNPIPEIOC_OFLUSH       _IO(XNPIPE_IOCTL_BASE, 2)
+#define XNPIPEIOC_FLUSH                XNPIPEIOC_OFLUSH
+#define XNPIPEIOC_SETSIG       _IO(XNPIPE_IOCTL_BASE, 3)
+
+#define XNPIPE_NORMAL  0x0
+#define XNPIPE_URGENT  0x1
+
+#define XNPIPE_IFLUSH  0x1
+#define XNPIPE_OFLUSH  0x2
+
+#define XNPIPE_MINOR_AUTO  (-1)
+
+#endif /* !_COBALT_UAPI_KERNEL_PIPE_H */
diff --git a/include/rtdm/uapi/ipc.h b/include/rtdm/uapi/ipc.h
index bdef4de..a558150 100644
--- a/include/rtdm/uapi/ipc.h
+++ b/include/rtdm/uapi/ipc.h
@@ -393,6 +393,7 @@ int getpeername__AF_RTIPC(int sockfd, struct sockaddr_ipc 
*addr, socklen_t *addr
 /** @} */
 
 #include <cobalt/uapi/kernel/types.h>
+#include <cobalt/uapi/kernel/pipe.h>
 #include <rtdm/rtdm.h>
 
 /* Address family */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to