#include "ridhaOsKernel.h" /* Define a fixed linked list of Stack */ tControlBlock_t tcbs[NUM_OF_THREADS]; /* Define current Pointer to point to first of the list of Stack*/ tControlBlock_t * currentPt; /* Each Thread will have STACKSIZE * 4. */ int32_t TCB_STACK[NUM_OF_THREADS][STACKSIZE]; void ridhaOsKernalStackInit(int i) { /* Set bit24 Thumb state bit to one, operate in thumb mode */ TCB_STACK[i][STACKSIZE-1] = (1U << 24); // PSR register }