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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [rtos.c] - Diff between revs 434 and 436

Show entire file | Details | Blame | View Log

Rev 434 Rev 436
Line 26... Line 26...
#define PRINTF_DEBUG(STRING, A, B)
#define PRINTF_DEBUG(STRING, A, B)
//#define PRINTF_DEBUG(STRING, A, B) UartPrintfCritical(STRING, A, B)
//#define PRINTF_DEBUG(STRING, A, B) UartPrintfCritical(STRING, A, B)
 
 
/*************** Structures ***************/
/*************** Structures ***************/
#ifdef WIN32
#ifdef WIN32
 
   #ifndef setjmp
   #define setjmp _setjmp
   #define setjmp _setjmp
 
   #endif
   //x86 registers
   //x86 registers
   typedef struct jmp_buf2 {
   typedef struct jmp_buf2 {
      uint32 Ebp, Ebx, Edi, Esi, sp, pc, extra[10];
      uint32 Ebp, Ebx, Edi, Esi, sp, pc, extra[10];
   } jmp_buf2;
   } jmp_buf2;
#elif defined(ARM_CPU)
#elif defined(ARM_CPU)
Line 284... Line 286...
 
 
 
 
/***************** Thread *****************/
/***************** Thread *****************/
/******************************************/
/******************************************/
//Linked list of threads sorted by priority
//Linked list of threads sorted by priority
//The listed list is either ThreadHead (ready to run threads not including
//The linked list is either ThreadHead (ready to run threads not including
//the currently running thread) or a list of threads waiting on a semaphore.
//the currently running thread) or a list of threads waiting on a semaphore.
//Must be called with interrupts disabled
//Must be called with interrupts disabled
static void OS_ThreadPriorityInsert(OS_Thread_t **head, OS_Thread_t *thread)
static void OS_ThreadPriorityInsert(OS_Thread_t **head, OS_Thread_t *thread)
{
{
   OS_Thread_t *node, *prev;
   OS_Thread_t *node, *prev;

powered by: WebSVN 2.1.0

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