* [Xenomai-core] [PATCH] Fix cleanup of timebase proc entries
@ 2007-10-14 15:31 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2007-10-14 15:31 UTC (permalink / raw)
To: Xenomai-core
[-- Attachment #1.1: Type: text/plain, Size: 265 bytes --]
Let's see how this works out: I've started to post my patches also to
the bug tracker at gna.org.
This one here fixes the broken cleanup of timerstat proc entries. Not
sure if I have caused the whole problem, but at least significant parts
of it. :-]
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: fix-timebase-proc-cleanup.patch --]
[-- Type: text/x-patch; name="fix-timebase-proc-cleanup.patch", Size: 2612 bytes --]
---
ChangeLog | 5 +++++
include/nucleus/timebase.h | 2 +-
ksrc/nucleus/module.c | 20 ++++++--------------
3 files changed, 12 insertions(+), 15 deletions(-)
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ xenomai/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-14 Jan Kiszka <jan.kiszka@domain.hid>
+
+ * include/nucleus/timebase.h, ksrc/nucleus/modules.c: Fix cleanup of
+ timebase proc entries.
+
2007-10-11 Johan Borkhuis <j.borkhuis@domain.hid>
* include/rtdm/rtdm_driver.h: Add private data pointer to rtdm_device
Index: xenomai/include/nucleus/timebase.h
===================================================================
--- xenomai.orig/include/nucleus/timebase.h
+++ xenomai/include/nucleus/timebase.h
@@ -363,7 +363,7 @@ do { \
#define xntbase_umount() \
do { \
- xnpod_declare_tbase_proc(&nktbase); \
+ xnpod_discard_tbase_proc(&nktbase); \
removeq(&nktimebaseq, &nktbase.link); \
} while (0)
Index: xenomai/ksrc/nucleus/module.c
===================================================================
--- xenomai.orig/ksrc/nucleus/module.c
+++ xenomai/ksrc/nucleus/module.c
@@ -1082,18 +1082,10 @@ void xnpod_delete_proc(void)
remove_proc_entry("latency", rthal_proc_root);
remove_proc_entry("sched", rthal_proc_root);
#ifdef CONFIG_XENO_OPT_STATS
- {
- xnholder_t *holder;
- xntbase_t *tbase;
-
- for (holder = getheadq(&nktimebaseq);
- holder != NULL; holder = nextq(&nktimebaseq, holder)) {
- tbase = link2tbase(holder);
- remove_proc_entry(tbase->name, tmstat_proc_root);
- }
- remove_proc_entry("timerstat", rthal_proc_root);
- remove_proc_entry("stat", rthal_proc_root);
- }
+ /* All timebases must have been deregistered now. */
+ XENO_ASSERT(NUCLEUS, !getheadq(&nktimebaseq), ;);
+ remove_proc_entry("timerstat", rthal_proc_root);
+ remove_proc_entry("stat", rthal_proc_root);
#endif /* CONFIG_XENO_OPT_STATS */
#if defined(CONFIG_SMP) && XENO_DEBUG(NUCLEUS)
remove_proc_entry("lock", rthal_proc_root);
@@ -1242,6 +1234,8 @@ void __exit __xeno_sys_exit(void)
xnshadow_cleanup();
#endif /* CONFIG_XENO_OPT_PERVASIVE */
+ xntbase_umount();
+
#if defined(__KERNEL__) && defined(CONFIG_PROC_FS)
xnpod_delete_proc();
#endif /* __KERNEL__ && CONFIG_PROC_FS */
@@ -1260,8 +1254,6 @@ void __exit __xeno_sys_exit(void)
#endif /* CONFIG_LTT */
#endif /* __KERNEL__ */
- xntbase_umount();
-
if (nkmsgbuf)
xnarch_free_host_mem(nkmsgbuf, XNPOD_FATAL_BUFSZ);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-14 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 15:31 [Xenomai-core] [PATCH] Fix cleanup of timebase proc entries Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.