_Internal_error_Occurred from rtems_semaphore_obtain in rtems_termios_write
Kenneth J. Peters
Kenneth.J.Peters at jpl.nasa.gov
Wed Aug 30 20:41:42 UTC 2006
I'm getting _Internal_error_Occurred called from
rtems_semaphore_obtain in rtems_termios_write.
Sparc erc32-based BSP on custom hardware.
Two issues:
1. The _Internal_error_Occurred call is actually in
cpukit/score/include/rtems/score/coremutex.h
and is just called with a hardcoded number, not an
Internal_errors_Core_list enum item from
cpukit/score/include/rtems/score/interr.h
>#define _CORE_mutex_Seize( \
> _the_mutex, _id, _wait, _timeout, _level ) \
> do { \
> if ( _Thread_Dispatch_disable_level \
> && (_wait) \
> && (_System_state_Get() >= SYSTEM_STATE_BEGIN_MULTITASKING ) \
> ) { \
> _Internal_error_Occurred( \
> INTERNAL_ERROR_CORE, \
> FALSE, \
> 18 /* called from wrong environment */); \
> } \
Seems like this error code should be in the Internal_errors_Core_list
enum . I don't know if there are any other hardcoded error values
elsewhere.
2. I have not traced all through my code yet, or created a simple
example. It could be that I am just doing something stupid like
accidentally trying to print in a trap handler. However, if some
kernel expert can explain a little about
_Thread_Dispatch_disable_level, that might help me figure out what's
going on. I am in multitasking when the error occurs, and the obtain
call is with RTEMS_WAIT, so those make general sense to me.
Ken Peters
Ken.Peters at jpl.nasa.gov
More information about the users
mailing list