* [Xenomai-help] Cleanup after using the vxWorks skin?
@ 2006-10-21 14:28 Niklaus Giger
2006-10-21 14:52 ` Philippe Gerum
0 siblings, 1 reply; 3+ messages in thread
From: Niklaus Giger @ 2006-10-21 14:28 UTC (permalink / raw)
To: xenomai
Hi
I run a program using the vxworks skin from user space. As did hang, I
typed "Ctrl-C" to end the program.
Looking at /proc/xenomai/registry/vxworks/semaphores/ I remarked however, that
there were still vxworks semaphores open, which had not been deleted.
Is it up to the programmer to clean up at exit? Or is this a bug in the
current Xenomai implementation?
My test program looks like this:
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "vxworks/vxworks.h"
extern "C" int root_thread_init();
extern "C" void root_thread_exit(void);
int main (int argc, char *argv[])
{
int tid;
mlockall(MCL_CURRENT|MCL_FUTURE);
atexit(&root_thread_exit);
tid = taskSpawn("root", 10, 0, 32*1024, (FUNCPTR) root_thread_init,
1,2,3,4,5,6,7,8,9,10);
if (tid > 0) pause();
return 1;
}
extern "C" void root_thread_exit(void)
{
printf("%s: task %d\n", __FUNCTION__, taskIdSelf());
}
extern "C" int root_thread_init()
{ const char* arg="";
const char* argv[2];
argv[0] = "undefined";
argv[1] = arg;
int argc = sizeof(argv) / sizeof(char*);
int semId1 = semCCreate(SEM_Q_PRIORITY, 3);
int semId3 = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE );
printf("proc %s: task %d %s \n", __FUNCTION__, taskIdSelf(),
taskName(taskIdSelf()));
taskDelay(sysClkRateGet());
printf("proc %s: task %d shutting down\n", __FUNCTION__, taskIdSelf());
// return 0;
exit(0);
}
Best regards
--
Niklaus Giger
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Cleanup after using the vxWorks skin?
2006-10-21 14:28 [Xenomai-help] Cleanup after using the vxWorks skin? Niklaus Giger
@ 2006-10-21 14:52 ` Philippe Gerum
2006-10-21 15:08 ` Niklaus Giger
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Gerum @ 2006-10-21 14:52 UTC (permalink / raw)
To: niklaus.giger; +Cc: xenomai
On Sat, 2006-10-21 at 16:28 +0200, Niklaus Giger wrote:
> Hi
>
> I run a program using the vxworks skin from user space. As did hang, I
> typed "Ctrl-C" to end the program.
>
> Looking at /proc/xenomai/registry/vxworks/semaphores/ I remarked however, that
> there were still vxworks semaphores open, which had not been deleted.
>
> Is it up to the programmer to clean up at exit? Or is this a bug in the
> current Xenomai implementation?
>
It's not a bug, but rather a limitation. We don't currently support
auto-cleanup of objects in the VxWorks skin.
--
Philippe.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Cleanup after using the vxWorks skin?
2006-10-21 14:52 ` Philippe Gerum
@ 2006-10-21 15:08 ` Niklaus Giger
0 siblings, 0 replies; 3+ messages in thread
From: Niklaus Giger @ 2006-10-21 15:08 UTC (permalink / raw)
To: rpm; +Cc: xenomai
Am Samstag, 21. Oktober 2006 16:52 schrieb Philippe Gerum:
> On Sat, 2006-10-21 at 16:28 +0200, Niklaus Giger wrote:
> > Hi
> >
> > I run a program using the vxworks skin from user space. As did hang, I
> > typed "Ctrl-C" to end the program.
> >
> > Looking at /proc/xenomai/registry/vxworks/semaphores/ I remarked however,
> > that there were still vxworks semaphores open, which had not been
> > deleted.
> >
> > Is it up to the programmer to clean up at exit? Or is this a bug in the
> > current Xenomai implementation?
>
> It's not a bug, but rather a limitation. We don't currently support
> auto-cleanup of objects in the VxWorks skin.
Though what about applying a small patch like this?
Index: doc/txt/vxworks-skin.txt
===================================================================
--- doc/txt/vxworks-skin.txt (Revision 1738)
+++ doc/txt/vxworks-skin.txt (Arbeitskopie)
@@ -104,6 +104,9 @@
taskDelete() which might need to wait for the deleted task to exit a
safe section (taskSafe/taskUnsafe) before proceeding.
+- There is currently no support for auto-cleanup of objects in the VxWorks
+ skin.
+
Module parameters
=================
Best regards
--
Niklaus Giger
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-21 15:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-21 14:28 [Xenomai-help] Cleanup after using the vxWorks skin? Niklaus Giger
2006-10-21 14:52 ` Philippe Gerum
2006-10-21 15:08 ` Niklaus Giger
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.