Merge branch 'bugfix/make_get_coreid_volatile' into 'master'

freertos: Make xPortGetCoreID() volatile

See merge request idf/esp-idf!4359
This commit is contained in:
Jeroen Domburg 2019-02-27 17:58:57 +08:00
commit a52ba8df7d

View File

@ -205,7 +205,7 @@ BaseType_t xPortInterruptedFromISRContext();
/* Multi-core: get current core ID */ /* Multi-core: get current core ID */
static inline uint32_t IRAM_ATTR xPortGetCoreID() { static inline uint32_t IRAM_ATTR xPortGetCoreID() {
int id; int id;
__asm__ ( __asm__ __volatile__ (
"rsr.prid %0\n" "rsr.prid %0\n"
" extui %0,%0,13,1" " extui %0,%0,13,1"
:"=r"(id)); :"=r"(id));