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

Subversion Repositories plasma

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

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

Rev 425 Rev 434
Line 227... Line 227...
{
{
   OS_Heap_t *heap;
   OS_Heap_t *heap;
   HeapNode_t *bp, *node;
   HeapNode_t *bp, *node;
 
 
   //UartPrintfCritical("OS_HeapFree(0x%x)\n", block);
   //UartPrintfCritical("OS_HeapFree(0x%x)\n", block);
   assert(block);
   if(block == NULL)
 
      return;
   bp = (HeapNode_t*)block - 1;   //point to block header
   bp = (HeapNode_t*)block - 1;   //point to block header
   heap = (OS_Heap_t*)bp->next;
   heap = (OS_Heap_t*)bp->next;
   assert(heap->magic == HEAP_MAGIC);
   assert(heap->magic == HEAP_MAGIC);
   if(heap->magic != HEAP_MAGIC)
   if(heap->magic != HEAP_MAGIC)
      return;
      return;
Line 1330... Line 1331...
      OS_AsmInterruptInit();            //Patch interrupt vector
      OS_AsmInterruptInit();            //Patch interrupt vector
   OS_InterruptMaskClear(0xffffffff);   //Disable interrupts
   OS_InterruptMaskClear(0xffffffff);   //Disable interrupts
   HeapArray[0] = OS_HeapCreate("Heap", heapStorage, bytes);
   HeapArray[0] = OS_HeapCreate("Heap", heapStorage, bytes);
   HeapArray[1] = HeapArray[0];
   HeapArray[1] = HeapArray[0];
#ifndef WIN32
#ifndef WIN32
 
   HeapArray[6] = OS_HeapCreate("2nd", (uint8*)RAM_EXTERNAL_BASE +
 
      0x180000, 1024*512);
 
   OS_HeapAlternate(HeapArray[0], HeapArray[6]);
   HeapArray[7] = OS_HeapCreate("Alt", (uint8*)RAM_EXTERNAL_BASE +
   HeapArray[7] = OS_HeapCreate("Alt", (uint8*)RAM_EXTERNAL_BASE +
      RAM_EXTERNAL_SIZE*2, 1024*1024*60);
      RAM_EXTERNAL_SIZE*2, 1024*1024*60);
   OS_HeapAlternate(HeapArray[0], HeapArray[7]);
   OS_HeapAlternate(HeapArray[6], HeapArray[7]);
#endif
#endif
   SemaphoreSleep = OS_SemaphoreCreate("Sleep", 0);
   SemaphoreSleep = OS_SemaphoreCreate("Sleep", 0);
   SemaphoreRelease = OS_SemaphoreCreate("Release", 1);
   SemaphoreRelease = OS_SemaphoreCreate("Release", 1);
   SemaphoreLock = OS_SemaphoreCreate("Lock", 1);
   SemaphoreLock = OS_SemaphoreCreate("Lock", 1);
   if((MemoryRead(IRQ_STATUS) & (IRQ_COUNTER18 | IRQ_COUNTER18_NOT)) == 0)
   if((MemoryRead(IRQ_STATUS) & (IRQ_COUNTER18 | IRQ_COUNTER18_NOT)) == 0)

powered by: WebSVN 2.1.0

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