xenomai-main
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xenomai-main] Exiting the Xenomai emulation


From: Fabrice TOMASI
Subject: [Xenomai-main] Exiting the Xenomai emulation
Date: Wed, 12 Nov 2003 16:00:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

            Hi,

Just a question about how to exit the emulation running on top of Xenomai (Xenomai is configured for the POSIX layer). In our project, we've got a constant which tells how long the emulation/simulation has to run before exiting. For instance, the test of the elapsed time is done in a custom interruption thread started with xnpod_start_timer(). So, this "thread" belongs to isvc0. What we want to do is to make Xenomai calls the posix_cleanup_application() function when exiting, which suppose that all Xenomai processes are killed (posix_thread_count must be 0). The problem is xnpod_shutdown() is called from the custom interruption thread but isvc0 can't shutdown itself because it is in an interrupt context. Hence the counter posix_thread_count can never be set to 0. So, we tried to solve this problem using another thread which is created at the very beginning of the emulation. This thread goes to sleep until the custom interruption thread resume it at the end of the emulation. Now, the xnpod_shutdown() can be called in this thread and the emulation exits normally. What do you think of this solution ? Is it good or is it wrong ? Is there a better way to solve this problem ?

      Thanks for help

         Fabrice.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]