6 #define ARRAY_SIZE(_x) sizeof(_x)/sizeof((_x)[0])
\r
8 #define OS_STR__(x) #x
\r
9 #define OS_STRSTR__(x) OS_STR__(x)
\r
12 #define MIN(_x,_y) (((_x) < (_y)) ? (_x) : (_y))
\r
15 #define MAX(_x,_y) (((_x) > (_y)) ? (_x) : (_y))
\r
19 * Holds information about stack usage
\r
21 typedef struct StackInfo_s {
\r
22 /* This task was swapped in with this stack */
\r
24 /* Pointer to the top of the stack */
\r
26 /* The size of the stack in bytes */
\r
28 /* Pointer to the current place of the stack */
\r
30 /* Calculated usage in % of total */
\r
35 * Converts OSEK StatusType to a string for easy printing
\r
37 const char *Arc_StatusToString(StatusType);
\r
39 void Os_Arc_GetStackInfo( TaskType pid, StackInfoType *s );
\r
41 #define OS_STACK_USAGE(_x) ((((_x)->size - (uint32_t)((size_t)(_x)->usage - (size_t)(_x)->top))*100)/(_x)->size)
\r
43 // int printf(const char *format, ...);
\r
45 TaskType Os_Arc_CreateIsr( void (*entry)(void), uint8_t prio, const char *name );
\r
48 * Get the task activation limit
\r
51 int Os_ArcTest_GetTaskActivationLimit( TaskType task );
\r
54 * Fake Irq. Used for API testing.
\r
55 * @param level The level
\r
57 void Os_ArcTest_SetIrqNestLevel( int level );
\r