heap_3.c File Reference

#include <stdlib.h>
#include "FreeRTOS.h"
#include "task.h"

Go to the source code of this file.

Defines

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

Functions

void * pvPortMalloc (size_t xWantedSize)
void vPortFree (void *pv)


Define Documentation

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

Definition at line 71 of file heap_3.c.


Function Documentation

void* pvPortMalloc ( size_t  xWantedSize  ) 

Definition at line 80 of file heap_3.c.

References vTaskSuspendAll(), and xTaskResumeAll().

Referenced by portTASK_FUNCTION(), prvAllocateTCBAndStack(), vCreateSuicidalTasks(), vMemCheckTask(), vStartAltBlockingQueueTasks(), vStartBlockingQueueTasks(), vStartSemaphoreTasks(), and xCoRoutineCreate().

00081 {
00082 void *pvReturn;
00083 
00084     vTaskSuspendAll();
00085     {
00086         pvReturn = malloc( xWantedSize );
00087     }
00088     xTaskResumeAll();
00089 
00090     #if( configUSE_MALLOC_FAILED_HOOK == 1 )
00091     {
00092         if( pvReturn == NULL )
00093         {
00094             extern void vApplicationMallocFailedHook( void );
00095             vApplicationMallocFailedHook();
00096         }
00097     }
00098     #endif
00099     
00100     return pvReturn;
00101 }

void vPortFree ( void *  pv  ) 

Definition at line 104 of file heap_3.c.

References vTaskSuspendAll(), and xTaskResumeAll().

Referenced by portTASK_FUNCTION(), prvAllocateTCBAndStack(), vMemCheckTask(), and vQueueDelete().

00105 {
00106     if( pv )
00107     {
00108         vTaskSuspendAll();
00109         {
00110             free( pv );
00111         }
00112         xTaskResumeAll();
00113     }
00114 }


Generated on Thu Dec 17 20:02:01 2009 for AVR32 UC3 - FreeRTOS Real Time Kernel by  doxygen 1.5.5