Commit 050feed8 authored by Philippe Gerum's avatar Philippe Gerum

Make the registry support a generic feature of the nucleus

git-svn-id: svn+ssh://svn.gna.org/svn/xenomai/trunk@602 c6d672ea-8702-0410-b560-f74c916a59fe
parent 139ec20c
2006-02-26 Philippe Gerum <rpm@xenomai.org>
* ksrc/nucleus, ksrc/skins/native: Make the registry support a
generic feature of the nucleus.
* src/testsuite/switch/switch.c (main):
* src/testsuite/latency/latency.c (main): Force aperiodic timing.
2006-02-25 Gilles Chanteperdrix <gilles.chanteperdrix@laposte.net>
* ksrc/skins/uvm/module.c (SKIN_INIT): Call xnpod_start_timer, in
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for Xenomai 2.0.92.
# Generated by GNU Autoconf 2.59 for Xenomai 2.0.93.
#
# Report bugs to <xenomai-help@gna.org>.
#
......@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Xenomai'
PACKAGE_TARNAME='xenomai'
PACKAGE_VERSION='2.0.92'
PACKAGE_STRING='Xenomai 2.0.92'
PACKAGE_VERSION='2.0.93'
PACKAGE_STRING='Xenomai 2.0.93'
PACKAGE_BUGREPORT='xenomai-help@gna.org'
ac_unique_file="src/skins/native/task.c"
......@@ -963,7 +963,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Xenomai 2.0.92 to adapt to many kinds of systems.
\`configure' configures Xenomai 2.0.93 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1030,7 +1030,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Xenomai 2.0.92:";;
short | recursive ) echo "Configuration of Xenomai 2.0.93:";;
esac
cat <<\_ACEOF
......@@ -1207,7 +1207,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
Xenomai configure 2.0.92
Xenomai configure 2.0.93
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
......@@ -1221,7 +1221,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Xenomai $as_me 2.0.92, which was
It was created by Xenomai $as_me 2.0.93, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
......@@ -4195,7 +4195,7 @@ fi
# Define the identity of the package.
PACKAGE='xenomai'
VERSION='2.0.92'
VERSION='2.0.93'
cat >>confdefs.h <<_ACEOF
......@@ -22047,7 +22047,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by Xenomai $as_me 2.0.92, which was
This file was extended by Xenomai $as_me 2.0.93, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -22113,7 +22113,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
Xenomai config.status 2.0.92
Xenomai config.status 2.0.93
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
......
......@@ -10,7 +10,6 @@ include_HEADERS = \
mutex.h \
pipe.h \
queue.h \
registry.h \
sem.h \
syscall.h \
task.h \
......
......@@ -221,7 +221,6 @@ include_HEADERS = \
mutex.h \
pipe.h \
queue.h \
registry.h \
sem.h \
syscall.h \
task.h \
......
......@@ -37,7 +37,7 @@ typedef struct rt_alarm_info {
} RT_ALARM_INFO;
typedef struct rt_alarm_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_ALARM_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -50,7 +50,7 @@ typedef struct rt_alarm {
xntimer_t timer_base; /* !< Base timer object. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
rt_alarm_t handler; /* !< Alarm handler. */
......
......@@ -34,7 +34,7 @@ typedef struct rt_cond_info {
} RT_COND_INFO;
typedef struct rt_cond_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_COND_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -47,7 +47,7 @@ typedef struct rt_cond {
xnsynch_t synch_base; /* !< Base synchronization object. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......@@ -84,7 +84,7 @@ int rt_cond_bind(RT_COND *cond,
static inline int rt_cond_unbind (RT_COND *cond)
{
cond->opaque = RT_HANDLE_INVALID;
cond->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -44,7 +44,7 @@ typedef struct rt_event_info {
} RT_EVENT_INFO;
typedef struct rt_event_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_EVENT_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -59,7 +59,7 @@ typedef struct rt_event {
unsigned long value; /* !< Event group value. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......@@ -96,7 +96,7 @@ int rt_event_bind(RT_EVENT *event,
static inline int rt_event_unbind (RT_EVENT *event)
{
event->opaque = RT_HANDLE_INVALID;
event->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -48,7 +48,7 @@ typedef struct rt_heap_info {
typedef struct rt_heap_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
void *opaque2;
......@@ -76,7 +76,7 @@ typedef struct rt_heap {
void *sba; /* !< Single block ara (H_SINGLE only) */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......
......@@ -43,7 +43,7 @@ typedef struct rt_intr_info {
} RT_INTR_INFO;
typedef struct rt_intr_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_INTR_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -69,7 +69,7 @@ typedef struct rt_intr {
void *private_data; /* !< Private user-defined data. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......@@ -128,7 +128,7 @@ int rt_intr_bind(RT_INTR *intr,
static inline int rt_intr_unbind (RT_INTR *intr)
{
intr->opaque = RT_HANDLE_INVALID;
intr->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -38,7 +38,7 @@ typedef struct rt_mutex_info {
} RT_MUTEX_INFO;
typedef struct rt_mutex_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_MUTEX_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -51,7 +51,7 @@ typedef struct __rt_mutex {
xnsynch_t synch_base; /* !< Base synchronization object. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
struct rt_task *owner; /* !< Current mutex owner. */
......@@ -92,7 +92,7 @@ int rt_mutex_bind(RT_MUTEX *mutex,
static inline int rt_mutex_unbind (RT_MUTEX *mutex)
{
mutex->opaque = RT_HANDLE_INVALID;
mutex->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -33,7 +33,7 @@
#define P_MINOR_AUTO XNPIPE_MINOR_AUTO
typedef struct rt_pipe_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_PIPE_PLACEHOLDER;
#ifdef __KERNEL__
......@@ -66,7 +66,7 @@ typedef struct rt_pipe {
u_long flushable; /* !< Flush request flag. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......@@ -141,7 +141,7 @@ int rt_pipe_bind(RT_PIPE *pipe,
static inline int rt_pipe_unbind (RT_PIPE *pipe)
{
pipe->opaque = RT_HANDLE_INVALID;
pipe->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -57,7 +57,7 @@ typedef struct rt_queue_info {
typedef struct rt_queue_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
void *opaque2;
......@@ -83,7 +83,7 @@ typedef struct rt_queue {
int mode; /* !< Creation mode. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
int qlimit; /* !< Maximum queued elements. */
......
......@@ -41,7 +41,7 @@ typedef struct rt_sem_info {
} RT_SEM_INFO;
typedef struct rt_sem_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_SEM_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......@@ -58,7 +58,7 @@ typedef struct rt_sem {
int mode; /* !< Creation mode. */
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
xnhandle_t handle; /* !< Handle in registry -- zero if unregistered. */
char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */
......@@ -95,7 +95,7 @@ int rt_sem_bind(RT_SEM *sem,
static inline int rt_sem_unbind (RT_SEM *sem)
{
sem->opaque = RT_HANDLE_INVALID;
sem->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -60,7 +60,7 @@
#define T_HIPRIO XNCORE_HIGH_PRIO
typedef struct rt_task_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
unsigned long opaque2;
} RT_TASK_PLACEHOLDER;
......@@ -112,11 +112,8 @@ typedef struct rt_task {
xnthread_t thread_base;
rt_handle_t handle; /* !< Handle in registry -- zero if unregistered. */
char rname[XNOBJECT_NAME_LEN]; /* !< Name in registry. Not the same as
thread name for anonymous threads. */
int suspend_depth;
int overrun;
......@@ -143,10 +140,6 @@ typedef struct rt_task {
void *block;
} heap;
struct {
const char *key;
} registry;
#ifdef CONFIG_XENO_OPT_NATIVE_MPS
struct {
RT_TASK_MCB mcb_s; /* Send area. */
......@@ -218,7 +211,7 @@ int rt_task_bind(RT_TASK *task,
static inline int rt_task_unbind (RT_TASK *task)
{
task->opaque = RT_HANDLE_INVALID;
task->opaque = XN_NO_HANDLE;
return 0;
}
......
......@@ -58,10 +58,6 @@ typedef long long SRTIME;
#endif /* __KERNEL__ || __XENO_SIM__ */
typedef unsigned long rt_handle_t;
#define RT_HANDLE_INVALID ((rt_handle_t)0)
typedef xnsigmask_t rt_sigset_t;
#define RT_HANDLER_NONE XNTHREAD_INVALID_ASR
......
......@@ -10,6 +10,7 @@ include_HEADERS = \
pipe.h \
pod.h \
queue.h \
registry.h \
shadow.h \
synch.h \
system.h \
......
......@@ -221,6 +221,7 @@ include_HEADERS = \
pipe.h \
pod.h \
queue.h \
registry.h \
shadow.h \
synch.h \
system.h \
......
......@@ -19,29 +19,29 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _XENO_REGISTRY_H
#define _XENO_REGISTRY_H
#ifndef _XENO_NUCLEUS_REGISTRY_H
#define _XENO_NUCLEUS_REGISTRY_H
#include <native/types.h>
#include <nucleus/types.h>
#define RT_REGISTRY_SELF RT_HANDLE_INVALID
#define XNOBJECT_SELF XN_NO_HANDLE
#if defined(__KERNEL__) && defined(CONFIG_PROC_FS) && defined(CONFIG_XENO_OPT_NATIVE_REGISTRY)
#define CONFIG_XENO_NATIVE_EXPORT_REGISTRY 1
#endif /* __KERNEL__ && CONFIG_PROC_FS && CONFIG_XENO_OPT_NATIVE_REGISTRY */
#if defined(__KERNEL__) && defined(CONFIG_PROC_FS) && defined(CONFIG_XENO_OPT_REGISTRY)
#define CONFIG_XENO_EXPORT_REGISTRY 1
#endif /* __KERNEL__ && CONFIG_PROC_FS && CONFIG_XENO_OPT_REGISTRY */
#if defined(__KERNEL__) || defined(__XENO_SIM__)
#include <nucleus/synch.h>
#include <nucleus/thread.h>
struct rt_object_procnode;
struct xnpnode;
typedef struct rt_object {
typedef struct xnobject {
xnholder_t link;
#define link2rtobj(laddr) \
((RT_OBJECT *)(((char *)laddr) - (int)(&((RT_OBJECT *)0)->link)))
#define link2xnobj(laddr) \
((xnobject_t *)(((char *)laddr) - (int)(&((xnobject_t *)0)->link)))
void *objaddr;
......@@ -55,83 +55,84 @@ typedef struct rt_object {
#if defined(CONFIG_PROC_FS) && defined(__KERNEL__)
struct rt_object_procnode *pnode; /* !< /proc information class. */
struct xnpnode *pnode; /* !< /proc information class. */
struct proc_dir_entry *proc; /* !< /proc entry. */
#endif /* CONFIG_PROC_FS && __KERNEL__ */
} RT_OBJECT;
} xnobject_t;
typedef struct rt_hash {
typedef struct xnobjhash {
RT_OBJECT *object;
xnobject_t *object;
struct rt_hash *next; /* !< Next in h-table */
struct xnobjhash *next; /* !< Next in h-table */
} RT_HASH;
} xnobjhash_t;
#ifdef __cplusplus
extern "C" {
#endif
int __native_registry_pkg_init(void);
int xnregistry_init(void);
void __native_registry_pkg_cleanup(void);
void xnregistry_cleanup(void);
#if defined(CONFIG_PROC_FS) && defined(__KERNEL__)
#include <linux/proc_fs.h>
#define RT_OBJECT_PROC_RESERVED1 ((struct proc_dir_entry *)1)
#define RT_OBJECT_PROC_RESERVED2 ((struct proc_dir_entry *)2)
#define XNOBJECT_PROC_RESERVED1 ((struct proc_dir_entry *)1)
#define XNOBJECT_PROC_RESERVED2 ((struct proc_dir_entry *)2)
typedef ssize_t link_proc_t(char *buf,
int count,
void *data);
typedef struct rt_object_procnode {
typedef struct xnpnode {
struct proc_dir_entry *dir;
const char *root;
const char *type;
int entries;
read_proc_t *read_proc;
write_proc_t *write_proc;
link_proc_t *link_proc;
} RT_OBJECT_PROCNODE;
} xnpnode_t;
#else /* !(CONFIG_PROC_FS && __KERNEL__) */
typedef struct rt_object_procnode { /* Placeholder. */
typedef struct xnpnode { /* Placeholder. */
const char *type;
} RT_OBJECT_PROCNODE;
} xnpnode_t;
#endif /* CONFIG_PROC_FS && __KERNEL__ */
/* Public interface. */
int rt_registry_enter(const char *key,
void *objaddr,
rt_handle_t *phandle,
RT_OBJECT_PROCNODE *pnode);
int xnregistry_enter(const char *key,
void *objaddr,
xnhandle_t *phandle,
xnpnode_t *pnode);
int rt_registry_bind(const char *key,
RTIME timeout,
rt_handle_t *phandle);
int xnregistry_bind(const char *key,
xnticks_t timeout,
xnhandle_t *phandle);
int rt_registry_remove(rt_handle_t handle);
int xnregistry_remove(xnhandle_t handle);
int rt_registry_remove_safe(rt_handle_t handle,
RTIME timeout);
int xnregistry_remove_safe(xnhandle_t handle,
xnticks_t timeout);
void *rt_registry_get(rt_handle_t handle);
void *xnregistry_get(xnhandle_t handle);
void *rt_registry_fetch(rt_handle_t handle);
void *xnregistry_fetch(xnhandle_t handle);
u_long rt_registry_put(rt_handle_t handle);
u_long xnregistry_put(xnhandle_t handle);
#ifdef __cplusplus
}
......@@ -139,4 +140,4 @@ u_long rt_registry_put(rt_handle_t handle);
#endif /* __KERNEL__ || __XENO_SIM__ */
#endif /* !_XENO_REGISTRY_H */
#endif /* !_XENO_NUCLEUS_REGISTRY_H */
......@@ -167,6 +167,13 @@ typedef struct xnthread {
int iprio; /* Initial priority */
#ifdef CONFIG_XENO_OPT_REGISTRY
struct {
xnhandle_t handle; /* Handle in registry */
const char *waitkey; /* Pended key */
} registry;
#endif /* CONFIG_XENO_OPT_REGISTRY */
unsigned magic; /* Skin magic. */
char name[XNOBJECT_NAME_LEN]; /* Symbolic name of thread */
......@@ -217,6 +224,7 @@ typedef struct xnhook {
#define xnthread_timeout(thread) xntimer_get_timeout(&(thread)->rtimer)
#define xnthread_stack_size(thread) xnarch_stack_size(xnthread_archtcb(thread))
#define xnthread_extended_info(thread) ((thread)->extinfo)
#define xnthread_handle(thread) ((thread)->registry.handle)
#define xnthread_set_magic(thread,m) do { (thread)->magic = (m); } while(0)
#define xnthread_get_magic(thread) ((thread)->magic)
#define xnthread_signaled_p(thread) ((thread)->signals != 0)
......
......@@ -50,6 +50,10 @@ typedef unsigned long long xntime_t; /* ns */
typedef long long xnstime_t;
typedef unsigned long xnhandle_t;
#define XN_NO_HANDLE ((xnhandle_t)0)
struct xnintr;
typedef int (*xnisr_t)(struct xnintr *intr);
......
......@@ -28,6 +28,6 @@
#define XENO_VERSION_NAME "Champagne"
#define XENO_VERSION_STRING "2.1-rc3"
#define XENO_VERSION_STRING "2.1-rc4"
#endif /* _XENO_NUCLEUS_VERSION_H */
......@@ -24,7 +24,7 @@
#include <rtai/types.h>
typedef struct rt_sem_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
} RT_SEM_PLACEHOLDER;
#if defined(__KERNEL__) || defined(__XENO_SIM__)
......
......@@ -27,7 +27,7 @@
#include <rtai/types.h>
typedef struct rt_task_placeholder {
rt_handle_t opaque;
xnhandle_t opaque;
unsigned long opaque2;
} RT_TASK_PLACEHOLDER;
......
......@@ -46,8 +46,4 @@ typedef long long RTIME;
#endif /* __KERNEL__ || __XENO_SIM__ */
typedef unsigned long rt_handle_t;
#define RT_HANDLE_INVALID ((rt_handle_t)0)
#endif /* !_RTAI_TYPES_H */
......@@ -14,6 +14,14 @@ if [ "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
if [ "$CONFIG_XENO_OPT_PIPE" != "n" ]; then
int 'Number of pipe devices' CONFIG_XENO_OPT_PIPE_NRDEV 32
fi
if [ "$CONFIG_XENO_OPT_PERVASIVE" != "n" ]; then
define_bool CONFIG_XENO_OPT_REGISTRY y
else
bool 'Registry support' CONFIG_XENO_OPT_REGISTRY
fi
if [ "$CONFIG_XENO_OPT_REGISTRY" != "n" ]; then
int 'Number of registry slots' CONFIG_XENO_OPT_REGISTRY_NRSLOTS 512
fi
int 'Size of the system heap (Kb)' CONFIG_XENO_OPT_SYS_HEAPSZ 128
bool 'Interrupt shield support' CONFIG_XENO_OPT_ISHIELD
bool 'Statistics collection' CONFIG_XENO_OPT_STATS
......
......@@ -38,6 +38,28 @@ config XENO_OPT_PIPE_NRDEV
in the system. Pipe devices are named /dev/rtpN where N is a
device minor number ranging from 0 to XENO_OPT_PIPE_NRDEV - 1.
config XENO_OPT_REGISTRY
bool
prompt "Registry support" if !XENO_OPT_PERVASIVE
default y
help
The registry is used by Xenomai skins to bind real-time
objects they create to symbolic names, so that these objects
can be further retrieved and shared by real-time applications
regardless of their runtime space (i.e. kernel or user). Each
named object occupies a registry slot.
config XENO_OPT_REGISTRY_NRSLOTS
int "Number of registry slots"
depends on XENO_OPT_REGISTRY
default 512
help
This option sets the maximum number of real-time objects the
registry can handle. All skins using the registry share this
storage.
config XENO_OPT_SYS_HEAPSZ
int "Size of the system heap (Kb)"
default 128
......
......@@ -10,6 +10,8 @@ xeno_nucleus-$(CONFIG_XENO_OPT_PERVASIVE) += shadow.o core.o
xeno_nucleus-$(CONFIG_XENO_OPT_PIPE) += pipe.o
xeno_nucleus-$(CONFIG_XENO_OPT_REGISTRY) += registry.o
xeno_nucleus-$(CONFIG_LTT) += ltt.o
EXTRA_CFLAGS += -Iinclude/xenomai
......@@ -29,6 +31,7 @@ xeno_nucleus-objs := heap.o intr.o module.o pod.o synch.o thread.o timer.o
opt_objs-y :=
opt_objs-$(CONFIG_XENO_OPT_PERVASIVE) += shadow.o core.o
opt_objs-$(CONFIG_XENO_OPT_PIPE) += pipe.o
opt_objs-$(CONFIG_XENO_OPT_REGISTRY) += registry.o
opt_objs-$(CONFIG_LTT) += ltt.o
xeno_nucleus-objs += $(opt_objs-y)
......
......@@ -746,6 +746,9 @@ int __init __xeno_sys_init (void)
#ifdef __KERNEL__
#ifdef CONFIG_XENO_OPT_PERVASIVE
xncore_umount();
cleanup_heap:
xnheap_umount();
......
......@@ -476,6 +476,10 @@ fail:
xnarch_hook_ipi(&xnpod_schedule_handler);
#ifdef CONFIG_XENO_OPT_REGISTRY
xnregistry_init();
#endif /* CONFIG_XENO_OPT_REGISTRY */
__clrbits(pod->status,XNPIDLE);
xnarch_memory_barrier();
......@@ -580,6 +584,10 @@ void xnpod_shutdown (int xtype)
xnlock_put_irqrestore(&nklock,s);
#ifdef CONFIG_XENO_OPT_REGISTRY
xnregistry_cleanup();
#endif /* CONFIG_XENO_OPT_REGISTRY */
xnarch_notify_halt();
xnlock_get_irqsave(&nklock,s);
......
......@@ -87,6 +87,10 @@ int xnthread_init (xnthread_t *thread,
thread->rrcredit = XN_INFINITE;
thread->wchan = NULL;
thread->magic = 0;
#ifdef CONFIG_XENO_OPT_REGISTRY
thread->registry.handle = XN_NO_HANDLE;
thread->registry.waitkey = NULL;
#endif /* CONFIG_XENO_OPT_REGISTRY */