soc: prefer assertions, disabling functions for cpu abstractions

Prefer assertions, making available functions only when caps support it
for cpu-related abstractions.

Changes cpu hal functions to stall, unstall, reset to not accept -1;
instead prefering macros that provide the same functionality.
This commit is contained in:
Renz Christian Bagaporo
2020-02-03 14:58:19 +08:00
parent cefc71cdcd
commit 7f864d24ad
12 changed files with 109 additions and 114 deletions

View File

@@ -23,17 +23,22 @@
#include "hal/cpu_types.h"
#include "hal/soc_hal.h"
#include "soc/soc_caps.h"
#include "sdkconfig.h"
void IRAM_ATTR esp_cpu_stall(int cpu_id)
{
#if SOC_CPU_CORES_NUM > 1
soc_hal_stall_core(cpu_id);
#endif
}
void IRAM_ATTR esp_cpu_unstall(int cpu_id)
{
#if SOC_CPU_CORES_NUM > 1
soc_hal_unstall_core(cpu_id);
#endif
}
void IRAM_ATTR esp_cpu_reset(int cpu_id)