mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos: Make xPortGetCoreID() volatile
When xPortGetCoreID() is called twice within a function, it might only be called once after compilation. This commit makes the inline assembly of the function volatile. Closes #3093
This commit is contained in:
parent
59b4091fe5
commit
5bbb991c90
@ -199,7 +199,7 @@ BaseType_t xPortInIsrContext();
|
||||
/* Multi-core: get current core ID */
|
||||
static inline uint32_t IRAM_ATTR xPortGetCoreID() {
|
||||
int id;
|
||||
asm (
|
||||
__asm__ __volatile__ (
|
||||
"rsr.prid %0\n"
|
||||
" extui %0,%0,13,1"
|
||||
:"=r"(id));
|
||||
|
Loading…
Reference in New Issue
Block a user