#2080 closed defect

Fatal error user extension exposes internal score Internal_errors_Source enum.

Reported by: Chris Johns Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

The fatal error user extension as shown here:

http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/c_user/c_user00406.html

references 'Internal_errors_Source' which is an internal score enum.

This interface should not be exposed this way and a "classic" api interface should be provided and the error states documented in the user manual.

The enum, its location and what it is used for is causing problems where changes such as:

http://git.rtems.org/rtems/commit/cpukit/score/include/rtems/score/interr.h?id=038e2f4a8825b8367a2b0102afdb017f0281deeb

are being applied. The change itself is valid because adding a way for an application to raise an error is important how-ever it is breaking the isolation of the score.

Maybe the error source enum value path in the score is changed to uint32_t and bit masked where the a bit states the usage, ie internal or external and then the remainder is a value. This removes the need for exporting a internal type from the score and allows the classic API to grow as it needs without the score being concerned.

Change History (2)

comment:1 Changed on Nov 16, 2012 at 7:34:27 AM by Sebastian Huber

Cc: Sebastian Huber added

I would not break this 17 year old API. Since we have one enum type that propagates through the interfaces we see the symbolic name in the debugger.

I added typedefs to give the types a rtems_* name:

http://git.rtems.org/rtems/commit/?id=e4b40531f3c4b9a6c12be10cc18a9d0f84570230

comment:2 Changed on Nov 23, 2014 at 3:43:41 PM by Joel Sherrill

Description: modified (diff)
Resolution: fixed
Status: newclosed
Version: unknown4.11

Sebastian did significant rework on the normal and fatal termination path. If there are still issues, raise another ticket.

Note: See TracTickets for help on using tickets.