All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] pthread exit and PTHREAD_WARNSW
@ 2011-04-12 14:27 Jeff Weber
  2011-04-12 14:38 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Weber @ 2011-04-12 14:27 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 2216 bytes --]

>From testing, I found that if I enable PTHREAD_WARNSW for a pthread, I must
explicitly disable this mode before the thread terminates, or the thread
draws a signal 24 SIGXCPU.

I've tried to simplify my thread terminations by pushing a function which
calls pthread_set_mode_np(PTHREAD_WARNSW, 0) onto the thread cleanup stack,
and always terminating the thread via pthread_exit().  However, this method
still draws a signal 24 SIGXCPU.    Here's a sample backtrace:

Program terminated with signal 24, CPU time limit exceeded.
#0  0xffffe424 in __kernel_vsyscall ()
(gdb) bt full
#0  0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb781d561 in pthread_once () from /lib/libpthread.so.0
No symbol table info available.
#2  0xb76e0450 in ?? () from /lib/libgcc_s.so.1
No symbol table info available.
#3  0xb76e09de in _Unwind_ForcedUnwind () from /lib/libgcc_s.so.1
No symbol table info available.
#4  0xb7821032 in _Unwind_ForcedUnwind () from /lib/libpthread.so.0
No symbol table info available.
#5  0xb781ea97 in __pthread_unwind () from /lib/libpthread.so.0
No symbol table info available.
#6  0xb7818a5e in pthread_exit () from /lib/libpthread.so.0
No symbol table info available.
#7  0x0804969b in my program termination code

Am I coding this incorrectly, or is this just the way pthreads interacts
with Xenomai?

my config:
# xeno-config --version
2.5.6
# ldd ./mq_test
        linux-gate.so.1 =>  (0xffffe000)
        libpthread_rt.so.1 => /usr/xenomai/lib/libpthread_rt.so.1
(0xb778b000)
        libxenomai.so.0 => /usr/xenomai/lib/libxenomai.so.0 (0xb7785000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb776a000)
        librt.so.1 => /lib/librt.so.1 (0xb7760000)
        librtdk.so.0 => /usr/xenomai/lib/librtdk.so.0 (0xb775a000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb766a000)
        libm.so.6 => /lib/libm.so.6 (0xb7640000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7622000)
        libc.so.6 => /lib/libc.so.6 (0xb74b7000)
        /lib/ld-linux.so.2 (0xb77b4000)
#> rpm -qf /lib/libpthread.so.0
glibc-2.11.2-3.1.1.i686
# uname -a
Linux xeno2 2.6.37.3-xeno-2.5.6-smp #1 SMP PREEMPT Fri Mar 11 12:43:02 CST
2011 i686 i686 i386 GNU/Linux


TIA,
Jeff

[-- Attachment #2: Type: text/html, Size: 2809 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-14 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-12 14:27 [Xenomai-help] pthread exit and PTHREAD_WARNSW Jeff Weber
2011-04-12 14:38 ` Gilles Chanteperdrix
2011-04-12 15:06   ` Jeff Weber
2011-04-12 15:20     ` Gilles Chanteperdrix
2011-04-12 18:39       ` Jeff Weber
2011-04-14 12:15         ` Gilles Chanteperdrix

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.