6 #define ARRAY_SIZE(_x) sizeof(_x)/sizeof((_x)[0])
\r
9 #define OS_STR__(x) #x
\r
10 #define OS_STRSTR__(x) OS_STR__(x)
\r
13 #define MIN(_x,_y) (((_x) < (_y)) ? (_x) : (_y))
\r
16 #define MAX(_x,_y) (((_x) > (_y)) ? (_x) : (_y))
\r
20 * Holds information about stack usage
\r
22 typedef struct StackInfo_s {
\r
23 /* This task was swapped in with this stack */
\r
25 /* Pointer to the top of the stack */
\r
27 /* The size of the stack in bytes */
\r
29 /* Pointer to the current place of the stack */
\r
31 /* Calculated usage in % of total */
\r
36 * Converts OSEK StatusType to a string for easy printing
\r
38 const char *Arc_StatusToString(StatusType);
\r
40 void Os_Arc_GetStackInfo( TaskType pid, StackInfoType *s );
\r
42 #define OS_STACK_USAGE(_x) ((((_x)->size - (uint32_t)((size_t)(_x)->usage - (size_t)(_x)->top))*100)/(_x)->size)
\r
44 // int printf(const char *format, ...);
\r
46 TaskType Os_Arc_CreateIsr( void (*entry)(void), uint8_t prio, const char *name );
\r
49 * Get the task activation limit
\r
52 int Os_ArcTest_GetTaskActivationLimit( TaskType task );
\r
55 * Fake Irq. Used for API testing.
\r
56 * @param level The level
\r
58 void Os_ArcTest_SetIrqNestLevel( int level );
\r