OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [rtos.c] - Diff between revs 189 and 200

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 189 Rev 200
Line 132... Line 132...
static OS_Semaphore_t *SemaphoreLock;
static OS_Semaphore_t *SemaphoreLock;
static OS_Semaphore_t *SemaphoreTimer;
static OS_Semaphore_t *SemaphoreTimer;
static OS_Timer_t *TimerHead;     //Linked list of timers sorted by timeout
static OS_Timer_t *TimerHead;     //Linked list of timers sorted by timeout
static OS_FuncPtr_t Isr[32];
static OS_FuncPtr_t Isr[32];
static int InterruptInside;
static int InterruptInside;
 
int InitStack[128];               //Used by boot.asm
 
 
 
 
/***************** Heap *******************/
/***************** Heap *******************/
/******************************************/
/******************************************/
OS_Heap_t *OS_HeapCreate(const char *name, void *memory, uint32 size)
OS_Heap_t *OS_HeapCreate(const char *name, void *memory, uint32 size)
Line 637... Line 638...
   thread->prevTimeout = NULL;
   thread->prevTimeout = NULL;
   thread->magic[0] = THREAD_MAGIC;
   thread->magic[0] = THREAD_MAGIC;
 
 
   OS_ThreadRegsInit(thread->env);
   OS_ThreadRegsInit(thread->env);
   env = (jmp_buf2*)thread->env;
   env = (jmp_buf2*)thread->env;
   env->sp = (uint32)stack + stackSize - 4;
   env->sp = (uint32)stack + stackSize - 24; //minimum stack frame size
   env->pc = (uint32)OS_ThreadInit;
   env->pc = (uint32)OS_ThreadInit;
 
 
   state = OS_CriticalBegin();
   state = OS_CriticalBegin();
   OS_ThreadPriorityInsert(&ThreadHead, thread);
   OS_ThreadPriorityInsert(&ThreadHead, thread);
   OS_ThreadReschedule(0);
   OS_ThreadReschedule(0);

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.