mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 07:00:05 +08:00
fix(newlib): Fix application disable intterupt then call newlib internal mutex function
This commit is contained in:
@ -224,6 +224,13 @@ void esp_mem_trace(const void *ptr, const char *trace, int no);
|
||||
*/
|
||||
#define esp_mem_mark_file(ptr) esp_mem_trace((ptr), __FILE__, LINE__)
|
||||
|
||||
/*
|
||||
* @brief check if CPU core interrupt is disable
|
||||
*
|
||||
* @return true if interrupt is disable or false
|
||||
*/
|
||||
bool interrupt_is_disable(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -300,6 +300,20 @@ void ResetCcountVal(unsigned int cnt_val)
|
||||
asm volatile("wsr a2, ccount");
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief check if CPU core interrupt is disable
|
||||
*/
|
||||
bool interrupt_is_disable(void)
|
||||
{
|
||||
uint32_t tmp;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rsr %0, PS\n"
|
||||
: "=a"(tmp) : : "memory");
|
||||
|
||||
return tmp & 0xFUL ? true : false;
|
||||
}
|
||||
|
||||
_xt_isr_entry isr[16];
|
||||
char _xt_isr_status = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user