00001 /* 00002 * Copyright (C) 2001,2002,2003,2004,2005 Philippe Gerum <rpm@xenomai.org>. 00003 * 00004 * Xenomai is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published 00006 * by the Free Software Foundation; either version 2 of the License, 00007 * or (at your option) any later version. 00008 * 00009 * Xenomai is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with Xenomai; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00017 * 02111-1307, USA. 00018 * 00019 * Core pod definitions. The core pod supports all APIs providing a 00020 * system call interface to user-space applications. Core APIs, namely 00021 * POSIX, native and RTDM, only use a sub-range of the available 00022 * priority levels of the core pod, in order to have them exhibit a 00023 * 1:1 mapping with Linux's SCHED_FIFO ascending priority 00024 * scale. Non-core APIs (e.g. VxWorks, VRTX) may also rely on the core 00025 * pod, provided they normalize the priority levels of their threads 00026 * when calling the nucleus, in order to match the priority scale 00027 * enforced by the former. 00028 */ 00029 00030 #ifndef _XENO_NUCLEUS_CORE_H 00031 #define _XENO_NUCLEUS_CORE_H 00032 00033 /* Visible priority range supported by the core pod. */ 00034 #define XNCORE_MIN_PRIO 0 00035 #define XNCORE_MAX_PRIO 257 00036 /* Base priority of the root thread for the core pod. */ 00037 #define XNCORE_IDLE_PRIO -1 00038 00039 /* Total number of priority levels (including the hidden root one) */ 00040 #define XNCORE_NR_PRIO (XNCORE_MAX_PRIO - XNCORE_IDLE_PRIO + 1) 00041 00042 /* Priority sub-range used by core APIs. */ 00043 #define XNCORE_LOW_PRIO 0 00044 #define XNCORE_HIGH_PRIO 99 00045 00046 /* Priority of IRQ servers in user-space. */ 00047 #define XNCORE_IRQ_PRIO XNCORE_MAX_PRIO 00048 00049 #ifdef __KERNEL__ 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif /* __cplusplus */ 00054 00055 int xncore_mount(void); 00056 00057 int xncore_umount(void); 00058 00059 int xncore_attach(void); 00060 00061 void xncore_detach(int xtype); 00062 00063 #ifdef __cplusplus 00064 }; 00065 #endif /* __cplusplus */ 00066 00067 #endif /* __KERNEL__ */ 00068 00069 #endif /* !_XENO_NUCLEUS_CORE_H */