mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'feature/enable_more_linux_examples' into 'master'
feat(linux): enable more examples for linux target See merge request espressif/esp-idf!50172
This commit is contained in:
@@ -137,9 +137,11 @@ extern void vPortCancelThread( void *pxTaskToDelete );
|
||||
*/
|
||||
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )
|
||||
|
||||
extern unsigned long ulPortGetRunTime( void );
|
||||
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() /* no-op */
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() ulPortGetRunTime()
|
||||
#if ( CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS )
|
||||
configRUN_TIME_COUNTER_TYPE xPortGetRunTimeCounterValue( void );
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() xPortGetRunTimeCounterValue()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/queue.h>
|
||||
#include <time.h>
|
||||
#include "string.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
@@ -592,3 +593,15 @@ void vPortCancelThread(void *pxTaskToDelete)
|
||||
void vPortSetStackWatchpoint(void *pxStackStart)
|
||||
{
|
||||
}
|
||||
|
||||
#if ( CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS )
|
||||
configRUN_TIME_COUNTER_TYPE xPortGetRunTimeCounterValue( void )
|
||||
{
|
||||
struct timespec ts;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
return ( configRUN_TIME_COUNTER_TYPE ) ( ( ( uint64_t ) ts.tv_sec * 1000000ULL ) +
|
||||
( ( uint64_t ) ts.tv_nsec / 1000ULL ) );
|
||||
}
|
||||
#endif /* CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS */
|
||||
|
||||
Reference in New Issue
Block a user