Commit d928926f authored by Philippe Gerum's avatar Philippe Gerum

cobalt: introduce uapi headers

Following the uapi introduction in recent kernels, this jumbo patch
splits the former Xenomai POSIX headers into kernel and userland
counterparts, privatizing the former into the kernel section when
applicable.

This change is aimed at centralizing the shared API types and
definitions used in system calls, making it easier to track changes to
the APIs that the kernel presents to user space, and solving inclusion
dependency issues the right way.

Headers defining the API bits shared between the Cobalt kernel and the
support libraries in userland are available from include/cobalt/uapi,
organized as follows:

- uapi/*.h => Cobalt/POSIX interface bits
- uapi/rtdm => RTDM bits
- uapi/sys/*.h => Low-level Cobalt kernel bits

As a consequence of this split, files below include/cobalt/kernel
become kernel-only headers, and POSIX headers in include/cobalt are
exclusively reserved for inclusion in user-space builds.

As an added benefit, this change significantly reduces the number of
headers to be installed for building Xenomai applications.
parent 65f220eb
......@@ -14098,7 +14098,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/cobalt/Makefile lib/cobalt/sysdeps/Makefile lib/cobalt/sysdeps/arm/Makefile lib/cobalt/sysdeps/powerpc/Makefile lib/cobalt/sysdeps/blackfin/Makefile lib/cobalt/sysdeps/x86/Makefile lib/cobalt/sysdeps/nios2/Makefile lib/cobalt/sysdeps/sh/Makefile lib/copperplate/Makefile lib/copperplate/regd/Makefile lib/alchemy/Makefile lib/vxworks/Makefile lib/psos/Makefile lib/analogy/Makefile lib/include/Makefile testsuite/Makefile testsuite/latency/Makefile testsuite/cyclic/Makefile testsuite/switchtest/Makefile testsuite/clocktest/Makefile testsuite/unit/Makefile testsuite/xeno-test/Makefile testsuite/regression/Makefile testsuite/regression/posix/Makefile utils/Makefile utils/can/Makefile utils/analogy/Makefile utils/ps/Makefile utils/slackspot/Makefile include/Makefile include/cobalt/asm-generic/Makefile include/cobalt/asm-generic/ipipe/Makefile include/cobalt/asm-blackfin/Makefile include/cobalt/asm-x86/Makefile include/cobalt/asm-powerpc/Makefile include/cobalt/asm-arm/Makefile include/cobalt/asm-nios2/Makefile include/cobalt/asm-sh/Makefile include/cobalt/Makefile include/cobalt/sys/Makefile include/cobalt/kernel/Makefile include/rtdm/Makefile include/analogy/Makefile include/mercury/Makefile include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile include/psos/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/cobalt/Makefile lib/cobalt/sysdeps/Makefile lib/cobalt/sysdeps/arm/Makefile lib/cobalt/sysdeps/powerpc/Makefile lib/cobalt/sysdeps/blackfin/Makefile lib/cobalt/sysdeps/x86/Makefile lib/cobalt/sysdeps/nios2/Makefile lib/cobalt/sysdeps/sh/Makefile lib/copperplate/Makefile lib/copperplate/regd/Makefile lib/alchemy/Makefile lib/vxworks/Makefile lib/psos/Makefile lib/analogy/Makefile lib/include/Makefile testsuite/Makefile testsuite/latency/Makefile testsuite/cyclic/Makefile testsuite/switchtest/Makefile testsuite/clocktest/Makefile testsuite/unit/Makefile testsuite/xeno-test/Makefile testsuite/regression/Makefile testsuite/regression/posix/Makefile utils/Makefile utils/can/Makefile utils/analogy/Makefile utils/ps/Makefile utils/slackspot/Makefile include/Makefile include/cobalt/uapi/Makefile include/cobalt/uapi/sys/Makefile include/cobalt/uapi/rtdm/Makefile include/cobalt/asm-generic/Makefile include/cobalt/asm-generic/ipipe/Makefile include/cobalt/asm-blackfin/Makefile include/cobalt/asm-x86/Makefile include/cobalt/asm-powerpc/Makefile include/cobalt/asm-arm/Makefile include/cobalt/asm-nios2/Makefile include/cobalt/asm-sh/Makefile include/cobalt/Makefile include/cobalt/sys/Makefile include/cobalt/kernel/Makefile include/rtdm/Makefile include/analogy/Makefile include/mercury/Makefile include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile include/psos/Makefile"
if test \! x$XENO_MAYBE_DOCDIR = x ; then
......@@ -15213,6 +15213,9 @@ do
"utils/ps/Makefile") CONFIG_FILES="$CONFIG_FILES utils/ps/Makefile" ;;
"utils/slackspot/Makefile") CONFIG_FILES="$CONFIG_FILES utils/slackspot/Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"include/cobalt/uapi/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/uapi/Makefile" ;;
"include/cobalt/uapi/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/uapi/sys/Makefile" ;;
"include/cobalt/uapi/rtdm/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/uapi/rtdm/Makefile" ;;
"include/cobalt/asm-generic/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/asm-generic/Makefile" ;;
"include/cobalt/asm-generic/ipipe/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/asm-generic/ipipe/Makefile" ;;
"include/cobalt/asm-blackfin/Makefile") CONFIG_FILES="$CONFIG_FILES include/cobalt/asm-blackfin/Makefile" ;;
......
......@@ -827,6 +827,9 @@ AC_CONFIG_FILES([ \
utils/ps/Makefile \
utils/slackspot/Makefile \
include/Makefile \
include/cobalt/uapi/Makefile \
include/cobalt/uapi/sys/Makefile \
include/cobalt/uapi/rtdm/Makefile \
include/cobalt/asm-generic/Makefile \
include/cobalt/asm-generic/ipipe/Makefile \
include/cobalt/asm-blackfin/Makefile \
......
includesubdir = $(includedir)/cobalt
includesub_HEADERS = \
core.h \
fcntl.h \
mqueue.h \
pthread.h \
sched.h \
semaphore.h \
signal.h \
stdio.h \
stdlib.h \
syscall.h \
syslog.h \
time.h \
unistd.h \
includesub_HEADERS = \
core.h \
fcntl.h \
mqueue.h \
pthread.h \
sched.h \
semaphore.h \
signal.h \
stdio.h \
stdlib.h \
syslog.h \
time.h \
trace.h \
unistd.h \
wrappers.h
SUBDIRS = \
......@@ -25,4 +25,5 @@ SUBDIRS = \
asm-sh \
asm-x86 \
kernel \
sys
sys \
uapi
......@@ -312,19 +312,19 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
includesubdir = $(includedir)/cobalt
includesub_HEADERS = \
core.h \
fcntl.h \
mqueue.h \
pthread.h \
sched.h \
semaphore.h \
signal.h \
stdio.h \
stdlib.h \
syscall.h \
syslog.h \
time.h \
unistd.h \
core.h \
fcntl.h \
mqueue.h \
pthread.h \
sched.h \
semaphore.h \
signal.h \
stdio.h \
stdlib.h \
syslog.h \
time.h \
trace.h \
unistd.h \
wrappers.h
SUBDIRS = \
......@@ -336,7 +336,8 @@ SUBDIRS = \
asm-sh \
asm-x86 \
kernel \
sys
sys \
uapi
all: all-recursive
......
includesubdir = $(includedir)/asm-generic
noinst_HEADERS = sem_heap.h
includesub_HEADERS = \
arith.h \
atomic.h \
current.h \
features.h \
machine.h \
mayday.h \
pci_ids.h \
seqlock.h \
stack.h \
syscall.h \
thread.h \
......
......@@ -52,8 +52,8 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = include/cobalt/asm-generic
DIST_COMMON = $(includesub_HEADERS) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
DIST_COMMON = $(includesub_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
$(top_srcdir)/config/docbook.m4 \
......@@ -111,7 +111,7 @@ am__uninstall_files_from_dir = { \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(includesubdir)"
HEADERS = $(includesub_HEADERS) $(noinst_HEADERS)
HEADERS = $(includesub_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
......@@ -311,15 +311,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
includesubdir = $(includedir)/asm-generic
noinst_HEADERS = sem_heap.h
includesub_HEADERS = \
arith.h \
atomic.h \
current.h \
features.h \
machine.h \
mayday.h \
pci_ids.h \
seqlock.h \
stack.h \
syscall.h \
thread.h \
......
#ifndef XENO_SEM_HEAP_H
#define XENO_SEM_HEAP_H
#include <cobalt/kernel/heap.h>
void cobalt_init_sem_heaps(void);
void *cobalt_map_heap(struct xnheap_desc *hd);
#endif /* XENO_SEM_HEAP_H */
#ifndef __SEQLOCK_H
#define __SEQLOCK_H
/*
* Copyright (C) 2009 Wolfgang Mauerer <wolfgang.mauerer@siemens.com>.
*
* 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 _COBALT_ASM_GENERIC_SEQLOCK_H
#define _COBALT_ASM_GENERIC_SEQLOCK_H
/* Originally from the linux kernel, adapted for userland and Xenomai */
#include <asm/xenomai/atomic.h>
typedef struct xnseqcount {
unsigned sequence;
unsigned int sequence;
} xnseqcount_t;
#define XNSEQCNT_ZERO { 0 }
......@@ -54,4 +72,4 @@ static inline void xnwrite_seqcount_end(xnseqcount_t *s)
s->sequence++;
}
#endif /* __SEQLOCK_H */
#endif /* !_COBALT_ASM_GENERIC_SEQLOCK_H */
......@@ -10,7 +10,7 @@
* 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.
......@@ -19,4 +19,6 @@
#ifndef _COBALT_CORE_H
#define _COBALT_CORE_H
#include <cobalt/trace.h>
#endif /* _COBALT_CORE_H */
/*
* Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>.
*
* This program 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.
* 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 program is distributed in the hope that it will be useful,
* 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 General Public License for more details.
* 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 General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* 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_FCNTL_H
#define _COBALT_FCNTL_H
#ifdef __KERNEL__
#include <linux/fcntl.h>
int open(const char *path, int oflag, ...);
#else /* !__KERNEL__ */
#include <time.h>
#pragma GCC system_header
#include_next <fcntl.h>
#include <cobalt/wrappers.h>
#ifdef __cplusplus
extern "C" {
......@@ -40,6 +33,4 @@ COBALT_DECL(int, open(const char *path, int oflag, ...));
}
#endif
#endif /* !__KERNEL__ */
#endif /* !_COBALT_FCNTL_H */
includesubdir = $(includedir)/cobalt/kernel
includesub_HEADERS = \
apc.h \
assert.h \
bheap.h \
bufd.h \
heap.h \
hostrt.h \
intr.h \
list.h \
lock.h \
map.h \
pipe.h \
pod.h \
ppd.h \
registry.h \
select.h \
sched.h \
schedparam.h \
schedqueue.h \
sched-idle.h \
sched-rt.h \
sched-sporadic.h \
sched-tp.h \
shadow.h \
stat.h \
synch.h \
thread.h \
clock.h \
timer.h \
trace.h \
types.h \
vdso.h \
seqlock.h \
noinst_HEADERS = \
apc.h \
assert.h \
bheap.h \
bufd.h \
clock.h \
heap.h \
intr.h \
list.h \
lock.h \
map.h \
pipe.h \
pod.h \
ppd.h \
registry.h \
sched.h \
sched-idle.h \
schedparam.h \
schedqueue.h \
sched-rt.h \
sched-sporadic.h \
sched-tp.h \
sched-weak.h \
select.h \
shadow.h \
stat.h \
synch.h \
thread.h \
timer.h \
trace.h \
types.h \
vdso.h \
vfile.h
......@@ -52,7 +52,7 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = include/cobalt/kernel
DIST_COMMON = $(includesub_HEADERS) $(srcdir)/Makefile.am \
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
......@@ -76,35 +76,7 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(includesubdir)"
HEADERS = $(includesub_HEADERS)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
......@@ -272,40 +244,38 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
includesubdir = $(includedir)/cobalt/kernel
includesub_HEADERS = \
apc.h \
assert.h \
bheap.h \
bufd.h \
heap.h \
hostrt.h \
intr.h \
list.h \
lock.h \
map.h \
pipe.h \
pod.h \
ppd.h \
registry.h \
select.h \
sched.h \
schedparam.h \
schedqueue.h \
sched-idle.h \
sched-rt.h \
sched-sporadic.h \
sched-tp.h \
shadow.h \
stat.h \
synch.h \
thread.h \
clock.h \
timer.h \
trace.h \
types.h \
vdso.h \
seqlock.h \
noinst_HEADERS = \
apc.h \
assert.h \
bheap.h \
bufd.h \
clock.h \
heap.h \
intr.h \
list.h \
lock.h \
map.h \
pipe.h \
pod.h \
ppd.h \
registry.h \
sched.h \
sched-idle.h \
schedparam.h \
schedqueue.h \
sched-rt.h \
sched-sporadic.h \
sched-tp.h \
sched-weak.h \
select.h \
shadow.h \
stat.h \
synch.h \
thread.h \
timer.h \
trace.h \
types.h \
vdso.h \
vfile.h
all: all-am
......@@ -347,27 +317,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
install-includesubHEADERS: $(includesub_HEADERS)
@$(NORMAL_INSTALL)
@list='$(includesub_HEADERS)'; test -n "$(includesubdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includesubdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includesubdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesubdir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includesubdir)" || exit $$?; \
done
uninstall-includesubHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(includesub_HEADERS)'; test -n "$(includesubdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includesubdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
......@@ -469,9 +418,6 @@ check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(includesubdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
......@@ -522,7 +468,7 @@ info: info-am
info-am:
install-data-am: install-includesubHEADERS
install-data-am:
install-dvi: install-dvi-am
......@@ -566,7 +512,7 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-includesubHEADERS
uninstall-am:
.MAKE: install-am install-strip
......@@ -575,14 +521,13 @@ uninstall-am: uninstall-includesubHEADERS
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-includesubHEADERS 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 uninstall uninstall-am \
uninstall-includesubHEADERS
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 uninstall \
uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
......
......@@ -20,7 +20,6 @@
#ifndef _COBALT_KERNEL_ASSERT_H
#define _COBALT_KERNEL_ASSERT_H
#include <cobalt/kernel/types.h>
#include <cobalt/kernel/trace.h>
#define XENO_DEBUG(subsystem) \
......@@ -47,4 +46,6 @@
#define CONFIG_XENO_OPT_DEBUG_NUCLEUS 0
#endif /* CONFIG_XENO_OPT_DEBUG_NUCLEUS */
void xnpod_fatal(const char *format, ...);
#endif /* !_COBALT_KERNEL_ASSERT_H */
......@@ -26,7 +26,7 @@
/*! \addtogroup bufd
*@{*/
#include <cobalt/kernel/types.h>
#include <linux/types.h>
struct mm_struct;
......
......@@ -26,8 +26,6 @@
/*! \addtogroup clock
*@{*/
#ifdef __KERNEL__
#include <cobalt/kernel/list.h>
#include <cobalt/kernel/vfile.h>
#include <asm-generic/xenomai/timeconv.h>
......@@ -78,8 +76,6 @@ void xnclock_init_proc(void);
void xnclock_cleanup_proc(void);
#endif /* __KERNEL__ */
/*@}*/
#endif /* !_COBALT_KERNEL_CLOCK_H */
......@@ -42,10 +42,12 @@
* requests ranging from the maximum page size to twice this size.
*/
#ifdef __KERNEL__
#include <cobalt/kernel/assert.h>
#include <cobalt/kernel/lock.h>
#include <cobalt/kernel/list.h>
#include <cobalt/kernel/trace.h>
#include <cobalt/kernel/types.h>
#include <cobalt/uapi/sys/heap.h>
#define XNHEAP_PAGE_SIZE 512 /* A reasonable value for the xnheap page size */
#define XNHEAP_PAGE_MASK (~(XNHEAP_PAGE_SIZE-1))
......@@ -178,8 +180,6 @@ static inline size_t xnheap_rounded_size(size_t hsize, size_t psize)
/* Private interface. */
#ifdef __KERNEL__
int xnheap_mount(void);
void xnheap_umount(void);
......@@ -208,8 +208,6 @@ void xnheap_destroy_mapped(struct xnheap *heap,
#define xnheap_mapped_p(heap) \
(xnheap_base_memory(heap) != 0)
#endif /* __KERNEL__ */
/* Public interface. */
int xnheap_init(struct xnheap *heap,
......@@ -276,21 +274,4 @@ int xnheap_remap_kmem_page_range(struct vm_area_struct *vma,
unsigned long from, unsigned long to,
unsigned long size, pgprot_t prot);
#endif /* __KERNEL__ */
#define XNHEAP_DEV_NAME "/dev/rtheap"
#define XNHEAP_DEV_MINOR 254
/* Possible arguments to the sys_heap_info syscall */
#define XNHEAP_PROC_PRIVATE_HEAP 0
#define XNHEAP_PROC_SHARED_HEAP 1
#define XNHEAP_SYS_HEAP 2
struct xnheap_desc {
unsigned long handle;
unsigned int size;
unsigned long area;
unsigned long used;
};
#endif /* !_COBALT_KERNEL_HEAP_H */
#ifndef _COBALT_KERNEL_HOSTRT_H
#define _COBALT_KERNEL_HOSTRT_H
/*!\file hostrt.h
* \brief Definitions for global semaphore heap shared objects
* \author Wolfgang Mauerer
*
* Copyright (C) 2010 Wolfgang Mauerer <wolfgang.mauerer@siemens.com>.
*
* 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 __KERNEL__
#include <time.h>
#include <sys/types.h>