All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Error when exiting pSOS-task with return
@ 2008-02-27 13:52 Markus Osterried
  2008-03-08 17:20 ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Osterried @ 2008-02-27 13:52 UTC (permalink / raw)
  To: Xenomai-core

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

Hello,
 
with Xenomai 2.4 on Linux 2.6.18 on PowerPC I have seen the following
trace:
 
Feb 26 19:37:25 (none) user.err kernel: BUG: sleeping function called
from invalid context at kernel/rwsem.c:20
Feb 26 19:37:25 (none) user.warn kernel: in_atomic():0,
irqs_disabled():1
Feb 26 19:37:25 (none) user.warn kernel: Call Trace:
Feb 26 19:37:25 (none) user.warn kernel: [C19BFE50] [C000C114]
show_stack+0x58/0x188 (unreliable)
Feb 26 19:37:25 (none) user.warn kernel: [C19BFEA0] [C00128B0]
__might_sleep+0xdc/0xf0
Feb 26 19:37:25 (none) user.warn kernel: [C19BFEC0] [C0032304]
down_read+0x24/0x58
Feb 26 19:37:25 (none) user.warn kernel: [C19BFED0] [C00192C8]
exit_mm+0x34/0xec
Feb 26 19:37:25 (none) user.warn kernel: [C19BFEF0] [C001B000]
do_exit+0x21c/0x98c
Feb 26 19:37:25 (none) user.warn kernel: [C19BFF30] [C001B810]
complete_and_exit+0x0/0x28
Feb 26 19:37:25 (none) user.warn kernel: [C19BFF40] [C00041A0]
ret_from_syscall+0x0/0x38
 
 
This happens (sometimes) when a pSOS-task exits by returning from its
main function.
I have changed the return statement into t_delete(0) and there was no
error anymore, so this isn't a major issue.
 
But anyway I would like to know whether this is a xenomai bug or it
isn't allowed to exit a pSOS-task by returning from main function.
I have seen at end of psos_task_trampoline that there is a
pthread_exit() instead of a t_delete().
 
Thanks
Markus
 

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

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

end of thread, other threads:[~2008-03-19 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-27 13:52 [Xenomai-core] Error when exiting pSOS-task with return Markus Osterried
2008-03-08 17:20 ` Philippe Gerum
2008-03-19  8:27   ` Markus Osterried
2008-03-19 17:56     ` Philippe Gerum

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.