StatusType rv = E_OK;\r
*TaskID = INVALID_TASK;\r
\r
-\r
- if( os_sys.curr_pcb->state & ST_RUNNING ) {\r
- *TaskID = os_sys.curr_pcb->pid;\r
- } else {\r
- /* We have no running task, check level */\r
-\r
- /* Call level is not from the OSEK specification but from the\r
- * test specification.\r
- * We cannot call ErrorHook here since the errorhook should be able to call this function.\r
- * See 12-1 footnote 13 in OSEK OS specification. */\r
- if( os_sys.int_nest_cnt != 0 ) {\r
- rv = E_OS_CALLEVEL;\r
+ /* Test specification say return CALLEVEL if in ISR\r
+ * but impl. spec says otherwise */\r
+ if( os_sys.int_nest_cnt == 0 ) {\r
+ if( os_sys.curr_pcb->state & ST_RUNNING ) {\r
+ *TaskID = os_sys.curr_pcb->pid;\r
+ } else {\r
+ /* This is not a real error since this could\r
+ * be the case when called from ErrorHook */
}\r
}\r
\r