Fabien MAHOT wrote:
> Thank you,
>
> I tried to use rt_fprintf(stderr) or rt_printf(), but there is no debug
> traces on my Screen. But when I used fprintf(stderr) or printf(), there is
> no problem, I ve got traces on my screen.
> Compilation is good, I don't know why it doesn't work.
>
> I also checked the info->si_value.sival_ptr value and it is good.
>
> My StackWrite and StackRead functions don't need a mutex. There is no
> conflict between them.
>
> Otherwise, I decided to cancel the lock use in EndTimeOut and I use a
> semaphore to indicate the time-out end to TimeOut thread. But there is a
> bug.
> This test program explains it :
> When TimeOut thread starts a time-out and waits the associated semaphore
> (sem_wait()). When signal of time-out end arrives, TimeOut thread wakes up
> whereas there is no sem_post(), and sem_wait returns no error.
The attached patch should fix the issue with sem_wait (or the
interruption of any system call by a posix skin signal). However, I am
unable to reproduce the crash.
--
Gilles.
Index: ksrc/skins/posix/signal.c
===================================================================
--- ksrc/skins/posix/signal.c (revision 3805)
+++ ksrc/skins/posix/signal.c (working copy)
@@ -1048,7 +1048,13 @@ static void pse51_dispatch_shadow_signal
{
/* Migrate to secondary mode in order to get the signals delivered by
Linux. */
+ xnthread_t *cur = xnpod_current_thread();
+ int interrupted;
+
+ interrupted = xnthread_test_info(cur, XNBREAK);
xnshadow_relax(1);
+ if (interrupted)
+ xnthread_set_info(cur, XNBREAK | XNKICKED);
}
void pse51_signal_handle_request(pthread_t thread)
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help