disable thread dispatch problem

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 6 09:57:15 UTC 2012


On 07/06/2012 11:49 AM, Ashi wrote:
> I've a problem of _Thread_Disable_dispatch() function in below code. It's my
> implementation of _POSIX_Keys_Run_destructors() function. I come across the
> problem when I run the psxkey03 test:if _Thread_Disable_dispatch() was
> commented out, psxkey03 can run without problem. when
> _Thread_Disable_dispatch() added at line 1(as below), psxkey03 will fail. I
> debug it in sparc-rtems4.11-gdb, and find psxkey03 runs into
> _Internal_error_Occurred() function then stop. I know _POSIX_Keys_Get()(at line
> 12) will also disable thread dispatch--does this lead to the problem? However,
> can't figure out where exactly the problem exists, could anyone explain it? Thanks!

The _Thread_Disable_dispatch() can nest.  I suppose you want to acquire a 
resource in the destructor which is not free.  The path to 
_Internal_error_Occurred() should show the problem.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.





More information about the devel mailing list