RTEMS Posix lock failure
sebastian.huber at embedded-brains.de
Sat Jan 4 10:17:55 UTC 2014
On 01/03/2014 11:32 PM, John Harwell wrote:
> In my code, I have determined that after a small number of pthread
> mutex lock/unlocks, suddenly
> RTEMS enters Internal_error_Occurred() from _CORE_mutex_Seize(). In
> order for this to happen, I have
> determined that the variable _Thread_Dispatch_disable_level must be >
> 0. As I understand it, RTEMS should
> take care of that when entering/leaving ISRs, but somehow it is not
> being properly decremented ( I have observed
> it to go to 2).
what is the value of the _ISR_Nest_level in this case? You cannot
obtain a mutex in interrupt context.
> If in gdb I clear _Thread_Dispatch_disable_level upon the call to
> _CORE_mutex_Seize() right before before my code
> had been locking up, it continues on and runs smoothly, and all
> subsequent lock/unlock calls work fine, implying
> that it is some sort of one-time issue.
> Any ideas on why this is happening?
You probably try to obtain a mutex in interrupt context. It can be also
a general memory corruption or a broken interrupt/context switch code.
> I am using RTEMS 4.10.
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
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 users