Module: xenomai-forge
Branch: next
Commit: 06609e088b3451c8bc328796b3835db8602ade0a
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=06609e088b3451c8bc328796b3835db8602ade0a

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Aug 19 10:59:44 2014 +0200

cobalt/rtdm: merge with Cobalt/POSIX personality

There is no need for a distinct RTDM personality. Features which can
be accessed from user-space belong to the POSIX I/O API, while RTDM
tasks directly sit on top of the core personality.

This patch merges the RTDM syscalls into the Cobalt/POSIX table, and
dropping the RTDM personality in the same move.

---

 configure                                    |    3 +-
 configure.ac                                 |    1 -
 include/cobalt/kernel/rtdm/driver.h          |    3 -
 include/cobalt/uapi/Makefile.am              |    2 +-
 include/cobalt/uapi/Makefile.in              |    2 +-
 include/cobalt/uapi/rtdm/Makefile.am         |    2 -
 include/cobalt/uapi/rtdm/Makefile.in         |  545 --------------------------
 include/cobalt/uapi/rtdm/syscall.h           |   34 --
 include/cobalt/uapi/syscall.h                |   11 +-
 kernel/cobalt/posix/Makefile                 |    1 +
 kernel/cobalt/{rtdm/syscall.c => posix/io.c} |   85 +---
 kernel/cobalt/{rtdm/syscall.h => posix/io.h} |   30 +-
 kernel/cobalt/posix/syscall.c                |   10 +
 kernel/cobalt/rtdm/Makefile                  |    3 +-
 kernel/cobalt/rtdm/core.c                    |    5 -
 kernel/cobalt/rtdm/drvlib.c                  |    2 +-
 kernel/cobalt/rtdm/init.c                    |   20 +-
 kernel/cobalt/rtdm/internal.h                |   11 -
 kernel/cobalt/rtdm/proc.c                    |   11 +-
 lib/cobalt/init.c                            |   13 +-
 lib/cobalt/rtdm.c                            |   35 +-
 21 files changed, 81 insertions(+), 748 deletions(-)

diff --git a/configure b/configure
index 3b7fbb5..8a71d58 100755
--- a/configure
+++ b/configure
@@ -14252,7 +14252,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files Makefile config/Makefile scripts/Makefile 
scripts/xeno-config:scripts/xeno-config-$rtcore_type.in scripts/xeno 
lib/Makefile lib/boilerplate/Makefile lib/cobalt/Makefile 
lib/cobalt/arch/Makefile lib/cobalt/arch/arm/Makefile 
lib/cobalt/arch/arm/include/Makefile lib/cobalt/arch/arm/include/asm/Makefile 
lib/cobalt/arch/arm/include/asm/xenomai/Makefile 
lib/cobalt/arch/powerpc/Makefile lib/cobalt/arch/powerpc/include/Makefile 
lib/cobalt/arch/powerpc/include/asm/Makefile 
lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile 
lib/cobalt/arch/blackfin/Makefile lib/cobalt/arch/blackfin/include/Makefile 
lib/cobalt/arch/blackfin/include/asm/Makefile 
lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile 
lib/cobalt/arch/x86/Makefile lib/cobalt/arch/x86/include/Makefile 
lib/cobalt/arch/x86/include/asm/Makefile 
lib/cobalt/arch/x86/include/asm/xenomai/Makefile lib/cobalt/arch/nios2/Makefile 
lib/cobalt/arch/nios2/include/Makefile lib/cobalt/arch/nios2/include/asm/Makef
 ile lib/cobalt/arch/nios2/include/asm/xenomai/Makefile 
lib/cobalt/arch/sh/Makefile lib/cobalt/arch/sh/include/Makefile 
lib/cobalt/arch/sh/include/asm/Makefile 
lib/cobalt/arch/sh/include/asm/xenomai/Makefile lib/copperplate/Makefile 
lib/copperplate/regd/Makefile lib/alchemy/Makefile lib/vxworks/Makefile 
lib/psos/Makefile lib/analogy/Makefile lib/smokey/Makefile lib/trank/Makefile 
testsuite/Makefile testsuite/latency/Makefile testsuite/switchtest/Makefile 
testsuite/smokey/Makefile testsuite/smokey/arith/Makefile 
testsuite/smokey/sched-quota/Makefile testsuite/smokey/sched-tp/Makefile 
testsuite/smokey/rtdm/Makefile testsuite/smokey/vdso-access/Makefile 
testsuite/smokey/cond-torture/Makefile testsuite/smokey/mutex-torture/Makefile 
testsuite/smokey/xddp/Makefile testsuite/smokey/iddp/Makefile 
testsuite/smokey/bufp/Makefile testsuite/clocktest/Makefile 
testsuite/xeno-test/Makefile testsuite/regression/Makefile 
testsuite/regression/posix/Makefile utils/Makefile utils/can/Makefile utils/ana
 logy/Makefile utils/ps/Makefile utils/slackspot/Makefile 
utils/autotune/Makefile demo/Makefile demo/posix/Makefile 
demo/posix/cobalt/Makefile demo/alchemy/Makefile demo/alchemy/cobalt/Makefile 
include/Makefile include/nocore/Makefile include/cobalt/uapi/Makefile 
include/cobalt/uapi/asm-generic/Makefile include/cobalt/uapi/kernel/Makefile 
include/cobalt/uapi/rtdm/Makefile include/cobalt/Makefile 
include/cobalt/sys/Makefile include/cobalt/kernel/Makefile 
include/cobalt/kernel/rtdm/Makefile include/cobalt/kernel/rtdm/analogy/Makefile 
include/cobalt/boilerplate/Makefile include/rtdm/Makefile 
include/rtdm/uapi/Makefile include/mercury/Makefile 
include/mercury/boilerplate/Makefile include/boilerplate/Makefile 
include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile 
include/psos/Makefile include/smokey/Makefile include/trank/Makefile 
include/trank/posix/Makefile include/trank/native/Makefile 
include/trank/rtdm/Makefile doc/Makefile doc/doxygen/Makefile doc/doxygen/xen
 o3prm-common.conf doc/doxygen/xeno3prm-html.conf 
doc/doxygen/xeno3prm-latex.conf doc/gitdoc/Makefile doc/asciidoc/Makefile"
+ac_config_files="$ac_config_files Makefile config/Makefile scripts/Makefile 
scripts/xeno-config:scripts/xeno-config-$rtcore_type.in scripts/xeno 
lib/Makefile lib/boilerplate/Makefile lib/cobalt/Makefile 
lib/cobalt/arch/Makefile lib/cobalt/arch/arm/Makefile 
lib/cobalt/arch/arm/include/Makefile lib/cobalt/arch/arm/include/asm/Makefile 
lib/cobalt/arch/arm/include/asm/xenomai/Makefile 
lib/cobalt/arch/powerpc/Makefile lib/cobalt/arch/powerpc/include/Makefile 
lib/cobalt/arch/powerpc/include/asm/Makefile 
lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile 
lib/cobalt/arch/blackfin/Makefile lib/cobalt/arch/blackfin/include/Makefile 
lib/cobalt/arch/blackfin/include/asm/Makefile 
lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile 
lib/cobalt/arch/x86/Makefile lib/cobalt/arch/x86/include/Makefile 
lib/cobalt/arch/x86/include/asm/Makefile 
lib/cobalt/arch/x86/include/asm/xenomai/Makefile lib/cobalt/arch/nios2/Makefile 
lib/cobalt/arch/nios2/include/Makefile lib/cobalt/arch/nios2/include/asm/Makef
 ile lib/cobalt/arch/nios2/include/asm/xenomai/Makefile 
lib/cobalt/arch/sh/Makefile lib/cobalt/arch/sh/include/Makefile 
lib/cobalt/arch/sh/include/asm/Makefile 
lib/cobalt/arch/sh/include/asm/xenomai/Makefile lib/copperplate/Makefile 
lib/copperplate/regd/Makefile lib/alchemy/Makefile lib/vxworks/Makefile 
lib/psos/Makefile lib/analogy/Makefile lib/smokey/Makefile lib/trank/Makefile 
testsuite/Makefile testsuite/latency/Makefile testsuite/switchtest/Makefile 
testsuite/smokey/Makefile testsuite/smokey/arith/Makefile 
testsuite/smokey/sched-quota/Makefile testsuite/smokey/sched-tp/Makefile 
testsuite/smokey/rtdm/Makefile testsuite/smokey/vdso-access/Makefile 
testsuite/smokey/cond-torture/Makefile testsuite/smokey/mutex-torture/Makefile 
testsuite/smokey/xddp/Makefile testsuite/smokey/iddp/Makefile 
testsuite/smokey/bufp/Makefile testsuite/clocktest/Makefile 
testsuite/xeno-test/Makefile testsuite/regression/Makefile 
testsuite/regression/posix/Makefile utils/Makefile utils/can/Makefile utils/ana
 logy/Makefile utils/ps/Makefile utils/slackspot/Makefile 
utils/autotune/Makefile demo/Makefile demo/posix/Makefile 
demo/posix/cobalt/Makefile demo/alchemy/Makefile demo/alchemy/cobalt/Makefile 
include/Makefile include/nocore/Makefile include/cobalt/uapi/Makefile 
include/cobalt/uapi/asm-generic/Makefile include/cobalt/uapi/kernel/Makefile 
include/cobalt/Makefile include/cobalt/sys/Makefile 
include/cobalt/kernel/Makefile include/cobalt/kernel/rtdm/Makefile 
include/cobalt/kernel/rtdm/analogy/Makefile include/cobalt/boilerplate/Makefile 
include/rtdm/Makefile include/rtdm/uapi/Makefile include/mercury/Makefile 
include/mercury/boilerplate/Makefile include/boilerplate/Makefile 
include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile 
include/psos/Makefile include/smokey/Makefile include/trank/Makefile 
include/trank/posix/Makefile include/trank/native/Makefile 
include/trank/rtdm/Makefile doc/Makefile doc/doxygen/Makefile 
doc/doxygen/xeno3prm-common.conf doc/doxygen/xeno
 3prm-html.conf doc/doxygen/xeno3prm-latex.conf doc/gitdoc/Makefile 
doc/asciidoc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -15391,7 +15391,6 @@ do
     "include/cobalt/uapi/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/uapi/Makefile" ;;
     "include/cobalt/uapi/asm-generic/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/uapi/asm-generic/Makefile" ;;
     "include/cobalt/uapi/kernel/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/uapi/kernel/Makefile" ;;
-    "include/cobalt/uapi/rtdm/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/uapi/rtdm/Makefile" ;;
     "include/cobalt/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/Makefile" ;;
     "include/cobalt/sys/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/sys/Makefile" ;;
     "include/cobalt/kernel/Makefile") CONFIG_FILES="$CONFIG_FILES 
include/cobalt/kernel/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 0963c4e..d8f12af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -899,7 +899,6 @@ AC_CONFIG_FILES([ \
        include/cobalt/uapi/Makefile \
        include/cobalt/uapi/asm-generic/Makefile \
        include/cobalt/uapi/kernel/Makefile \
-       include/cobalt/uapi/rtdm/Makefile \
        include/cobalt/Makefile \
        include/cobalt/sys/Makefile \
        include/cobalt/kernel/Makefile \
diff --git a/include/cobalt/kernel/rtdm/driver.h 
b/include/cobalt/kernel/rtdm/driver.h
index 28484be..60eb90f 100644
--- a/include/cobalt/kernel/rtdm/driver.h
+++ b/include/cobalt/kernel/rtdm/driver.h
@@ -138,10 +138,7 @@ enum rtdm_selecttype {
 
 /** @} rtdm_sync */
 
-struct rtdm_process;
-
 struct rtdm_devctx_reserved {
-       struct rtdm_process *owner;
        void (*close)(struct rtdm_fd *fd);
 };
 
diff --git a/include/cobalt/uapi/Makefile.am b/include/cobalt/uapi/Makefile.am
index 23b306c..0151e40 100644
--- a/include/cobalt/uapi/Makefile.am
+++ b/include/cobalt/uapi/Makefile.am
@@ -12,4 +12,4 @@ includesub_HEADERS =  \
        thread.h        \
        time.h
 
-SUBDIRS = asm-generic kernel rtdm
+SUBDIRS = asm-generic kernel
diff --git a/include/cobalt/uapi/Makefile.in b/include/cobalt/uapi/Makefile.in
index 0323ff4..3536278 100644
--- a/include/cobalt/uapi/Makefile.in
+++ b/include/cobalt/uapi/Makefile.in
@@ -384,7 +384,7 @@ includesub_HEADERS = \
        thread.h        \
        time.h
 
-SUBDIRS = asm-generic kernel rtdm
+SUBDIRS = asm-generic kernel
 all: all-recursive
 
 .SUFFIXES:
diff --git a/include/cobalt/uapi/rtdm/Makefile.am 
b/include/cobalt/uapi/rtdm/Makefile.am
deleted file mode 100644
index 5e45c68..0000000
--- a/include/cobalt/uapi/rtdm/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-
-noinst_HEADERS = syscall.h
diff --git a/include/cobalt/uapi/rtdm/Makefile.in 
b/include/cobalt/uapi/rtdm/Makefile.in
deleted file mode 100644
index 98669c3..0000000
--- a/include/cobalt/uapi/rtdm/Makefile.in
+++ /dev/null
@@ -1,545 +0,0 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \  ]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = include/cobalt/uapi/rtdm
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(noinst_HEADERS)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
-       $(top_srcdir)/config/libtool.m4 \
-       $(top_srcdir)/config/ltoptions.m4 \
-       $(top_srcdir)/config/ltsugar.m4 \
-       $(top_srcdir)/config/ltversion.m4 \
-       $(top_srcdir)/config/lt~obsolete.m4 \
-       $(top_srcdir)/config/version $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/xeno_config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-HEADERS = $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-A2X = @A2X@
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-ASCIIDOC = @ASCIIDOC@
-ASCIIDODC = @ASCIIDODC@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_EXEEXT = @BUILD_EXEEXT@
-BUILD_OBJEXT = @BUILD_OBJEXT@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
-CHECKFLAGS = @CHECKFLAGS@
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
-CPP_FOR_BUILD = @CPP_FOR_BUILD@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DOXYGEN = @DOXYGEN@
-DOXYGEN_HAVE_DOT = @DOXYGEN_HAVE_DOT@
-DOXYGEN_SHOW_INCLUDE_FILES = @DOXYGEN_SHOW_INCLUDE_FILES@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FUSE_CFLAGS = @FUSE_CFLAGS@
-FUSE_LIBS = @FUSE_LIBS@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LATEX_BATCHMODE = @LATEX_BATCHMODE@
-LATEX_MODE = @LATEX_MODE@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_FILE_OPTION = @LD_FILE_OPTION@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-W3M = @W3M@
-XENO_BUILD_ARGS = @XENO_BUILD_ARGS@
-XENO_BUILD_STRING = @XENO_BUILD_STRING@
-XENO_COBALT_CFLAGS = @XENO_COBALT_CFLAGS@
-XENO_DEMO_DIR = @XENO_DEMO_DIR@
-XENO_DOC_GIT = @XENO_DOC_GIT@
-XENO_FUSE_CFLAGS = @XENO_FUSE_CFLAGS@
-XENO_HOST_STRING = @XENO_HOST_STRING@
-XENO_LIB_LDFLAGS = @XENO_LIB_LDFLAGS@
-XENO_POSIX_WRAPPERS = @XENO_POSIX_WRAPPERS@
-XENO_TARGET_ARCH = @XENO_TARGET_ARCH@
-XENO_TARGET_CORE = @XENO_TARGET_CORE@
-XENO_TEST_DIR = @XENO_TEST_DIR@
-XENO_USER_APP_CFLAGS = @XENO_USER_APP_CFLAGS@
-XENO_USER_APP_LDFLAGS = @XENO_USER_APP_LDFLAGS@
-XENO_USER_CFLAGS = @XENO_USER_CFLAGS@
-XENO_USER_LDADD = @XENO_USER_LDADD@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-noinst_HEADERS = syscall.h
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-               && { if test -f $@; then exit 0; else break; fi; }; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 
include/cobalt/uapi/rtdm/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --foreign include/cobalt/uapi/rtdm/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-       -rm -f *.lo
-
-clean-libtool:
-       -rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-       $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-       set x; \
-       here=`pwd`; \
-       $(am__define_uniq_tagged_files); \
-       shift; \
-       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         if test $$# -gt 0; then \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             "$$@" $$unique; \
-         else \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             $$unique; \
-         fi; \
-       fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-       $(am__define_uniq_tagged_files); \
-       test -z "$(CTAGS_ARGS)$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && $(am__cd) $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-       list='$(am__tagged_files)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='$(DISTFILES)'; \
-         dist_files=`for file in $$list; do echo $$file; done | \
-         sed -e "s|^$$srcdirstrip/||;t" \
-             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-       case $$dist_files in \
-         */*) $(MKDIR_P) `echo "$$dist_files" | \
-                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-                          sort -u` ;; \
-       esac; \
-       for file in $$dist_files; do \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         if test -d $$d/$$file; then \
-           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-           if test -d "$(distdir)/$$file"; then \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
-           fi; \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
-           fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-         else \
-           test -f "$(distdir)/$$file" \
-           || cp -p $$d/$$file "$(distdir)/$$file" \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       if test -z '$(STRIP)'; then \
-         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
-             install; \
-       else \
-         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s 
\
-           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-       fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-       clean-libtool cscopelist-am ctags ctags-am distclean \
-       distclean-generic distclean-libtool distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
-       uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/include/cobalt/uapi/rtdm/syscall.h 
b/include/cobalt/uapi/rtdm/syscall.h
deleted file mode 100644
index f6c7c5c..0000000
--- a/include/cobalt/uapi/rtdm/syscall.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2005 Jan Kiszka <jan.kis...@web.de>.
- * Copyright (C) 2005 Joerg Langenberg <joerg.langenb...@gmx.net>.
- *
- * 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_RTDM_SYSCALL_H
-#define _COBALT_UAPI_RTDM_SYSCALL_H
-
-#define RTDM_BINDING_MAGIC     0x5254444D
-
-#define sc_rtdm_open           0
-#define sc_rtdm_socket         1
-#define sc_rtdm_close          2
-#define sc_rtdm_ioctl          3
-#define sc_rtdm_read           4
-#define sc_rtdm_write          5
-#define sc_rtdm_recvmsg         6
-#define sc_rtdm_sendmsg         7
-#define sc_rtdm_mmap            8
-
-#endif /* !_COBALT_UAPI_RTDM_SYSCALL_H */
diff --git a/include/cobalt/uapi/syscall.h b/include/cobalt/uapi/syscall.h
index f9e56c8..9100f9f 100644
--- a/include/cobalt/uapi/syscall.h
+++ b/include/cobalt/uapi/syscall.h
@@ -81,7 +81,16 @@
 #define sc_cobalt_sem_inquire           58
 #define sc_cobalt_event_inquire         59
 #define sc_cobalt_sigqueue             60
-/* 61-74 unimplemented */
+#define sc_cobalt_open                 61
+#define sc_cobalt_socket               62
+#define sc_cobalt_close                        63
+#define sc_cobalt_ioctl                        64
+#define sc_cobalt_read                 65
+#define sc_cobalt_write                        66
+#define sc_cobalt_recvmsg              67
+#define sc_cobalt_sendmsg              68
+#define sc_cobalt_mmap                 69
+/* 70-74 unimplemented */
 #define sc_cobalt_thread_join           75
 #define sc_cobalt_thread_kill           76
 #define sc_cobalt_select                77
diff --git a/kernel/cobalt/posix/Makefile b/kernel/cobalt/posix/Makefile
index 193f6fb..b37a1a6 100644
--- a/kernel/cobalt/posix/Makefile
+++ b/kernel/cobalt/posix/Makefile
@@ -5,6 +5,7 @@ posix-y :=              \
        cond.o          \
        event.o         \
        init.o          \
+       io.o            \
        monitor.o       \
        mqueue.o        \
        mutex.o         \
diff --git a/kernel/cobalt/rtdm/syscall.c b/kernel/cobalt/posix/io.c
similarity index 51%
rename from kernel/cobalt/rtdm/syscall.c
rename to kernel/cobalt/posix/io.c
index 0837128..7a0c26b 100644
--- a/kernel/cobalt/rtdm/syscall.c
+++ b/kernel/cobalt/posix/io.c
@@ -17,49 +17,46 @@
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 #include <linux/err.h>
-#include <linux/slab.h>
-#include <cobalt/kernel/shadow.h>
 #include <cobalt/kernel/ppd.h>
-#include "rtdm/syscall.h"
-#include "rtdm/internal.h"
+#include <xenomai/rtdm/internal.h>
+#include "io.h"
 
-int __rtdm_muxid;
-
-static int sys_rtdm_open(int fd, const char __user *u_path, int oflag)
+int cobalt_open(int fd, const char __user *u_path, int oflag)
 {
        char krnl_path[RTDM_MAX_DEVNAME_LEN + 1];
 
        if (unlikely(__xn_safe_strncpy_from_user(krnl_path, u_path,
                                                 sizeof(krnl_path) - 1) < 0))
                return -EFAULT;
+
        krnl_path[sizeof(krnl_path) - 1] = '\0';
 
        return __rt_dev_open(xnsys_ppd_get(0), fd, krnl_path, oflag);
 }
 
-static int
-sys_rtdm_socket(int fd, int protocol_family, int socket_type, int protocol)
+int cobalt_socket(int fd, int protocol_family,
+                 int socket_type, int protocol)
 {
        return __rt_dev_socket(xnsys_ppd_get(0), fd,
                        protocol_family, socket_type, protocol);
 }
 
-int sys_rtdm_ioctl(int fd, unsigned int request, void __user *arg)
+int cobalt_ioctl(int fd, unsigned int request, void __user *arg)
 {
        return rtdm_fd_ioctl(xnsys_ppd_get(0), fd, request, arg);
 }
 
-ssize_t sys_rtdm_read(int fd, void __user *buf, size_t size)
+ssize_t cobalt_read(int fd, void __user *buf, size_t size)
 {
        return rtdm_fd_read(xnsys_ppd_get(0), fd, buf, size);
 }
 
-ssize_t sys_rtdm_write(int fd, const void __user *buf, size_t size)
+ssize_t cobalt_write(int fd, const void __user *buf, size_t size)
 {
        return rtdm_fd_write(xnsys_ppd_get(0), fd, buf, size);
 }
 
-ssize_t sys_rtdm_recvmsg(int fd, struct msghdr __user *umsg, int flags)
+ssize_t cobalt_recvmsg(int fd, struct msghdr __user *umsg, int flags)
 {
        struct msghdr m;
        int ret;
@@ -77,7 +74,7 @@ ssize_t sys_rtdm_recvmsg(int fd, struct msghdr __user *umsg, 
int flags)
        return ret;
 }
 
-ssize_t sys_rtdm_sendmsg(int fd, struct msghdr __user *umsg, int flags)
+ssize_t cobalt_sendmsg(int fd, struct msghdr __user *umsg, int flags)
 {
        struct msghdr m;
 
@@ -87,12 +84,12 @@ ssize_t sys_rtdm_sendmsg(int fd, struct msghdr __user 
*umsg, int flags)
        return rtdm_fd_sendmsg(xnsys_ppd_get(0), fd, &m, flags);
 }
 
-int sys_rtdm_close(int fd)
+int cobalt_close(int fd)
 {
        return rtdm_fd_close(xnsys_ppd_get(0), fd, XNFD_MAGIC_ANY);
 }
 
-int sys_rtdm_mmap(int fd, struct _rtdm_mmap_request __user *u_rma,
+int cobalt_mmap(int fd, struct _rtdm_mmap_request __user *u_rma,
                   void __user **u_addrp)
 {
        struct _rtdm_mmap_request rma;
@@ -111,59 +108,3 @@ int sys_rtdm_mmap(int fd, struct _rtdm_mmap_request __user 
*u_rma,
 
        return 0;
 }
-
-static void *rtdm_process_attach(void)
-{
-       struct rtdm_process *process;
-
-       process = kmalloc(sizeof(*process), GFP_KERNEL);
-       if (process == NULL)
-               return ERR_PTR(-ENOSPC);
-
-#ifdef CONFIG_XENO_OPT_VFILE
-       memcpy(process->name, current->comm, sizeof(process->name));
-       process->pid = current->pid;
-#endif /* CONFIG_XENO_OPT_VFILE */
-
-       return process;
-}
-
-static void rtdm_process_detach(void *arg)
-{
-       struct rtdm_process *process = arg;
-
-       kfree(process);
-}
-
-static struct xnsyscall rtdm_syscalls[] = {
-       SKINCALL_DEF(sc_rtdm_open, sys_rtdm_open, lostage),
-       SKINCALL_DEF(sc_rtdm_socket, sys_rtdm_socket, lostage),
-       SKINCALL_DEF(sc_rtdm_close, sys_rtdm_close, lostage),
-       SKINCALL_DEF(sc_rtdm_mmap, sys_rtdm_mmap, lostage),
-       SKINCALL_DEF(sc_rtdm_ioctl, sys_rtdm_ioctl, probing),
-       SKINCALL_DEF(sc_rtdm_read, sys_rtdm_read, probing),
-       SKINCALL_DEF(sc_rtdm_write, sys_rtdm_write, probing),
-       SKINCALL_DEF(sc_rtdm_recvmsg, sys_rtdm_recvmsg, probing),
-       SKINCALL_DEF(sc_rtdm_sendmsg, sys_rtdm_sendmsg, probing),
-};
-
-struct xnpersonality rtdm_personality = {
-       .name = "rtdm",
-       .magic = RTDM_BINDING_MAGIC,
-       .nrcalls = ARRAY_SIZE(rtdm_syscalls),
-       .syscalls = rtdm_syscalls,
-       .ops = {
-               .attach_process = rtdm_process_attach,
-               .detach_process = rtdm_process_detach,
-       },
-};
-EXPORT_SYMBOL_GPL(rtdm_personality);
-
-int __init rtdm_syscall_init(void)
-{
-       __rtdm_muxid = xnshadow_register_personality(&rtdm_personality);
-       if (__rtdm_muxid < 0)
-               return -ENOSYS;
-
-       return 0;
-}
diff --git a/kernel/cobalt/rtdm/syscall.h b/kernel/cobalt/posix/io.h
similarity index 54%
rename from kernel/cobalt/rtdm/syscall.h
rename to kernel/cobalt/posix/io.h
index dbbd661..9884a1d 100644
--- a/kernel/cobalt/rtdm/syscall.h
+++ b/kernel/cobalt/posix/io.h
@@ -16,21 +16,27 @@
  * along with Xenomai; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
+#ifndef _COBALT_POSIX_IO_H
+#define _COBALT_POSIX_IO_H
 
-#ifndef _RTDM_SYSCALL_H
-#define _RTDM_SYSCALL_H
+int cobalt_open(int fd, const char __user *u_path, int oflag);
 
-#include <asm/xenomai/syscall.h>
-#include <cobalt/kernel/shadow.h>
-#include <cobalt/uapi/rtdm/syscall.h>
+int cobalt_socket(int fd, int protocol_family,
+                 int socket_type, int protocol);
 
-extern int __rtdm_muxid;
+int cobalt_ioctl(int fd, unsigned int request, void __user *arg);
 
-int __init rtdm_syscall_init(void);
+ssize_t cobalt_read(int fd, void __user *buf, size_t size);
 
-static inline void rtdm_syscall_cleanup(void)
-{
-       xnshadow_unregister_personality(__rtdm_muxid);
-}
+ssize_t cobalt_write(int fd, const void __user *buf, size_t size);
 
-#endif /* _RTDM_SYSCALL_H */
+ssize_t cobalt_recvmsg(int fd, struct msghdr __user *umsg, int flags);
+
+ssize_t cobalt_sendmsg(int fd, struct msghdr __user *umsg, int flags);
+
+int cobalt_close(int fd);
+
+int cobalt_mmap(int fd, struct _rtdm_mmap_request __user *u_rma,
+               void __user **u_addrp);
+
+#endif /* !_COBALT_POSIX_IO_H */
diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index d921d81..480ae2c 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -39,6 +39,7 @@
 #include "event.h"
 #include "select.h"
 #include "timerfd.h"
+#include "io.h"
 
 int cobalt_muxid;
 
@@ -164,6 +165,15 @@ static struct xnsyscall cobalt_syscalls[] = {
        SKINCALL_DEF(sc_cobalt_event_inquire, cobalt_event_inquire, current),
        SKINCALL_DEF(sc_cobalt_sched_setconfig_np, cobalt_sched_setconfig_np, 
current),
        SKINCALL_DEF(sc_cobalt_sched_getconfig_np, cobalt_sched_getconfig_np, 
current),
+       SKINCALL_DEF(sc_cobalt_open, cobalt_open, lostage),
+       SKINCALL_DEF(sc_cobalt_socket, cobalt_socket, lostage),
+       SKINCALL_DEF(sc_cobalt_close, cobalt_close, lostage),
+       SKINCALL_DEF(sc_cobalt_mmap, cobalt_mmap, lostage),
+       SKINCALL_DEF(sc_cobalt_ioctl, cobalt_ioctl, probing),
+       SKINCALL_DEF(sc_cobalt_read, cobalt_read, probing),
+       SKINCALL_DEF(sc_cobalt_write, cobalt_write, probing),
+       SKINCALL_DEF(sc_cobalt_recvmsg, cobalt_recvmsg, probing),
+       SKINCALL_DEF(sc_cobalt_sendmsg, cobalt_sendmsg, probing),
 };
 
 struct xnpersonality cobalt_personality = {
diff --git a/kernel/cobalt/rtdm/Makefile b/kernel/cobalt/rtdm/Makefile
index 51e7011..5bfd198 100644
--- a/kernel/cobalt/rtdm/Makefile
+++ b/kernel/cobalt/rtdm/Makefile
@@ -5,8 +5,7 @@ rtdm-y :=       core.o          \
                device.o        \
                drvlib.o        \
                fd.o            \
-               init.o          \
-               syscall.o
+               init.o
 
 rtdm-$(CONFIG_PROC_FS) += proc.o
 
diff --git a/kernel/cobalt/rtdm/core.c b/kernel/cobalt/rtdm/core.c
index c16b163..41d368c 100644
--- a/kernel/cobalt/rtdm/core.c
+++ b/kernel/cobalt/rtdm/core.c
@@ -21,7 +21,6 @@
 #include <cobalt/kernel/ppd.h>
 #include <cobalt/kernel/heap.h>
 #include <cobalt/kernel/apc.h>
-#include "rtdm/syscall.h"
 #include "rtdm/internal.h"
 #define CREATE_TRACE_POINTS
 #include <trace/events/cobalt-rtdm.h>
@@ -125,10 +124,6 @@ static int create_instance(struct xnsys_ppd *p, int fd,
        }
 
        context->reserved.close = device->reserved.close;
-       if (p == &__xnsys_global_ppd)
-               context->reserved.owner = NULL;
-       else
-               context->reserved.owner = xnshadow_get_context(__rtdm_muxid);
 
        err = rtdm_fd_enter(p, &context->fd, fd, RTDM_FD_MAGIC, &device->ops);
        if (err < 0)
diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c
index 54cf288..c13b8f5 100644
--- a/kernel/cobalt/rtdm/drvlib.c
+++ b/kernel/cobalt/rtdm/drvlib.c
@@ -114,7 +114,7 @@ int rtdm_task_init(rtdm_task_t *task, const char *name,
 
        iattr.name = name;
        iattr.flags = 0;
-       iattr.personality = &rtdm_personality;
+       iattr.personality = &xenomai_personality;
        iattr.affinity = CPU_MASK_ALL;
        param.rt.prio = priority;
 
diff --git a/kernel/cobalt/rtdm/init.c b/kernel/cobalt/rtdm/init.c
index 85464d8..140e313 100644
--- a/kernel/cobalt/rtdm/init.c
+++ b/kernel/cobalt/rtdm/init.c
@@ -20,7 +20,6 @@
  */
 #include <linux/init.h>
 #include <linux/module.h>
-#include "rtdm/syscall.h"
 #include "rtdm/internal.h"
 
 /**
@@ -41,7 +40,6 @@ MODULE_LICENSE("GPL");
 
 void rtdm_cleanup(void)
 {
-       rtdm_syscall_cleanup();
        rtdm_proc_cleanup();
        rtdm_dev_cleanup();
 }
@@ -55,20 +53,10 @@ int __init rtdm_init(void)
                return ret;
 
        ret = rtdm_proc_init();
-       if (ret)
-               goto cleanup_dev;
-
-       ret = rtdm_syscall_init();
-       if (ret)
-               goto cleanup_proc;
+       if (ret) {
+               rtdm_dev_cleanup();
+               return ret;
+       }
 
        return 0;
-
-cleanup_proc:
-       rtdm_proc_cleanup();
-
-cleanup_dev:
-       rtdm_dev_cleanup();
-
-       return ret;
 }
diff --git a/kernel/cobalt/rtdm/internal.h b/kernel/cobalt/rtdm/internal.h
index 8d98789..8012e22 100644
--- a/kernel/cobalt/rtdm/internal.h
+++ b/kernel/cobalt/rtdm/internal.h
@@ -34,25 +34,14 @@
 
 struct rtdm_fd;
 
-struct rtdm_process {
-#ifdef CONFIG_XENO_OPT_VFILE
-       char name[32];
-       pid_t pid;
-#endif /* CONFIG_XENO_OPT_VFILE */
-};
-
 DECLARE_EXTERN_XNLOCK(rt_fildes_lock);
 DECLARE_EXTERN_XNLOCK(rt_dev_lock);
 
-extern int __rtdm_muxid;
 extern int open_fildes;
 extern struct semaphore nrt_dev_lock;
 extern struct list_head rtdm_named_devices;
 extern struct rb_root rtdm_protocol_devices;
-extern struct xnpersonality rtdm_personality;
 
-void cleanup_process_files(struct rtdm_process *owner);
-int rtdm_no_support(void);
 struct rtdm_device *__rtdm_get_named_device(const char *name, int *minor_r);
 struct rtdm_device *__rtdm_get_protocol_device(int protocol_family, int 
socket_type);
 
diff --git a/kernel/cobalt/rtdm/proc.c b/kernel/cobalt/rtdm/proc.c
index 16082fe..10f6cb2 100644
--- a/kernel/cobalt/rtdm/proc.c
+++ b/kernel/cobalt/rtdm/proc.c
@@ -182,13 +182,11 @@ static int openfd_show(struct xnvfile_regular_iterator 
*it, void *data)
 {
        struct rtdm_dev_context *context;
        struct rtdm_device *device;
-       struct rtdm_process *owner;
        int close_lock_count, i;
        struct rtdm_fd *fd;
 
        if (data == NULL) {
-               xnvfile_puts(it, "Index\tLocked\tMinor\tDevice"
-                            "\t\t\t\tOwner [PID]\n");
+               xnvfile_puts(it, "Index\tLocked\tMinor\tDevice\n");
                return 0;
        }
 
@@ -201,15 +199,12 @@ static int openfd_show(struct xnvfile_regular_iterator 
*it, void *data)
        context = rtdm_fd_to_context(fd);
        close_lock_count = fd->refs;
        device = context->device;
-       owner = context->reserved.owner;
 
-       xnvfile_printf(it, "%d\t%d\t%d\t%-31s %s [%d]\n", i,
+       xnvfile_printf(it, "%d\t%d\t%d\t%s\n", i,
                       close_lock_count,
                       rtdm_fd_minor(fd),
                       (device->device_flags & RTDM_NAMED_DEVICE) ?
-                      device->device_name : device->proc_name,
-                      owner ? owner->name : "<kernel>",
-                      owner ? owner->pid : 0);
+                      device->device_name : device->proc_name);
 
        rtdm_fd_put(fd);
 
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index f00733d..6ab94b3 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -28,7 +28,6 @@
 #include <semaphore.h>
 #include <boilerplate/ancillaries.h>
 #include <cobalt/uapi/kernel/heap.h>
-#include <cobalt/uapi/rtdm/syscall.h>
 #include <cobalt/ticks.h>
 #include <asm/xenomai/syscall.h>
 #include "sem_heap.h"
@@ -54,8 +53,6 @@ struct sigaction __cobalt_orig_sigdebug;
 
 pthread_t __cobalt_main_ptid;
 
-int __rtdm_muxid = -1;
-
 static void sigill_handler(int sig)
 {
        const char m[] = "no Xenomai support in kernel?\n";
@@ -136,7 +133,6 @@ static void __init_cobalt(void);
 
 void __libcobalt_init(void)
 {
-       struct xnbindreq breq;
        struct sigaction sa;
        int muxid, ret;
 
@@ -146,19 +142,12 @@ void __libcobalt_init(void)
                exit(EXIT_FAILURE);
        }
 
+       __cobalt_muxid = __xn_mux_shifted_id(muxid);
        sa.sa_sigaction = cobalt_sigdebug_handler;
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = SA_SIGINFO;
        sigaction(SIGDEBUG, &sa, &__cobalt_orig_sigdebug);
 
-       __cobalt_muxid = __xn_mux_shifted_id(muxid);
-
-       breq.feat_req = XENOMAI_FEAT_DEP;
-       breq.abi_rev = XENOMAI_ABI_REV;
-       muxid = XENOMAI_SYSBIND(RTDM_BINDING_MAGIC, &breq);
-       if (muxid > 0)
-               __rtdm_muxid = __xn_mux_shifted_id(muxid);
-
        /*
         * Upon fork, in case the parent required init deferral, this
         * is the forkee's responsibility to call __libcobalt_init()
diff --git a/lib/cobalt/rtdm.c b/lib/cobalt/rtdm.c
index f6b8fde..2f7837d 100644
--- a/lib/cobalt/rtdm.c
+++ b/lib/cobalt/rtdm.c
@@ -26,12 +26,9 @@
 #include <sys/socket.h>
 #include <sys/mman.h>
 #include <rtdm/rtdm.h>
-#include <cobalt/uapi/rtdm/syscall.h>
 #include <cobalt/uapi/syscall.h>
 #include <asm/xenomai/syscall.h>
-
-extern int __rtdm_muxid;
-extern int __cobalt_muxid;
+#include "internal.h"
 
 static inline int set_errno(int ret)
 {
@@ -55,7 +52,7 @@ COBALT_IMPL(int, open, (const char *path, int oflag, ...))
         * the kernel service.
         */
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid, sc_rtdm_open, fd, path, oflag);
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid, sc_cobalt_open, fd, path, 
oflag);
        pthread_setcanceltype(oldtype, NULL);
        if (ret == fd)
                return fd;
@@ -80,8 +77,8 @@ COBALT_IMPL(int, socket, (int protocol_family, int 
socket_type, int protocol))
        if (fd < 0)
                return fd;
 
-       ret = XENOMAI_SKINCALL4(__rtdm_muxid,
-                               sc_rtdm_socket,
+       ret = XENOMAI_SKINCALL4(__cobalt_muxid,
+                               sc_cobalt_socket,
                                fd, protocol_family, socket_type, protocol);
        if (ret == fd)
                return fd;
@@ -100,7 +97,7 @@ COBALT_IMPL(int, close, (int fd))
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL1(__rtdm_muxid, sc_rtdm_close, fd);
+       ret = XENOMAI_SKINCALL1(__cobalt_muxid, sc_cobalt_close, fd);
 
        pthread_setcanceltype(oldtype, NULL);
 
@@ -119,8 +116,8 @@ static int __xn_ioctl(int fd, unsigned long request, void 
*arg)
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid,
-                               sc_rtdm_ioctl,
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid,
+                               sc_cobalt_ioctl,
                                fd, request, arg);
 
        pthread_setcanceltype(oldtype, NULL);
@@ -151,8 +148,8 @@ COBALT_IMPL(ssize_t, read, (int fd, void *buf, size_t 
nbyte))
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid,
-                               sc_rtdm_read,
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid,
+                               sc_cobalt_read,
                                fd, buf, nbyte);
 
        pthread_setcanceltype(oldtype, NULL);
@@ -169,8 +166,8 @@ COBALT_IMPL(ssize_t, write, (int fd, const void *buf, 
size_t nbyte))
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid,
-                               sc_rtdm_write,
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid,
+                               sc_cobalt_write,
                                fd, buf, nbyte);
 
        pthread_setcanceltype(oldtype, NULL);
@@ -187,8 +184,8 @@ static ssize_t __xn_recvmsg(int fd, struct msghdr *msg, int 
flags)
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid,
-                               sc_rtdm_recvmsg,
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid,
+                               sc_cobalt_recvmsg,
                                fd, msg, flags);
 
        pthread_setcanceltype(oldtype, NULL);
@@ -213,8 +210,8 @@ static ssize_t __xn_sendmsg(int fd, const struct msghdr 
*msg, int flags)
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid,
-                               sc_rtdm_sendmsg,
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid,
+                               sc_cobalt_sendmsg,
                                fd, msg, flags);
 
        pthread_setcanceltype(oldtype, NULL);
@@ -414,7 +411,7 @@ COBALT_IMPL(void *, mmap, (void *addr, size_t length, int 
prot, int flags,
        rma.prot = prot;
        rma.flags = flags;
 
-       ret = XENOMAI_SKINCALL3(__rtdm_muxid, sc_rtdm_mmap, fd, &rma, &addr);
+       ret = XENOMAI_SKINCALL3(__cobalt_muxid, sc_cobalt_mmap, fd, &rma, 
&addr);
        if (ret != -EBADF && ret != -ENOSYS) {
                ret = set_errno(ret);
                if (ret)


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

Reply via email to