]> granicus.if.org Git - esp-idf/blobdiff - components/freertos/include/freertos/portable.h
Merge branch 'bugfix/github_prs' into 'master'
[esp-idf] / components / freertos / include / freertos / portable.h
index 096e481e00b55a5c627b6c5da16548f8ac0ee71c..33b740e8903f5977fa74a1cf69eb08f15a78893d 100644 (file)
@@ -123,6 +123,7 @@ extern "C" {
 #endif
 
 #include "mpu_wrappers.h"
+#include "esp_system.h"
 
 /*
  * Setup the stack of a new task so it is ready to be placed under the
@@ -143,11 +144,10 @@ extern "C" {
  * non-FreeRTOS-specific code, and behave the same as
  * pvPortMalloc()/vPortFree().
  */
-void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
-void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
-void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
-size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
-size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
+#define pvPortMalloc malloc
+#define vPortFree free
+#define xPortGetFreeHeapSize esp_get_free_heap_size
+#define xPortGetMinimumEverFreeHeapSize esp_get_minimum_free_heap_size
 
 /*
  * Setup the hardware ready for the scheduler to take control.  This generally
@@ -183,6 +183,12 @@ void vPortSetStackWatchpoint( void* pxStackStart );
  */
 BaseType_t xPortInIsrContext();
 
+/*
+ * This function will be called in High prio ISRs. Returns true if the current core was in ISR context
+ * before calling into high prio ISR context.
+ */
+BaseType_t xPortInterruptedFromISRContext();
+
 /*
  * The structures and methods of manipulating the MPU are contained within the
  * port layer.
@@ -199,7 +205,7 @@ BaseType_t xPortInIsrContext();
 /* Multi-core: get current core ID */
 static inline uint32_t IRAM_ATTR xPortGetCoreID() {
     int id;
-    asm (
+    __asm__ (
         "rsr.prid %0\n"
         " extui %0,%0,13,1"
         :"=r"(id));
@@ -213,5 +219,7 @@ uint32_t xPortGetTickRateHz(void);
 }
 #endif
 
+void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set);
+
 #endif /* PORTABLE_H */