mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-25 17:58:46 +00:00
Add static initializers for muxes, add mutex init to vPortCPUAcquireMutex
This commit is contained in:
@@ -147,6 +147,13 @@ typedef struct {
|
||||
#define portMUX_VAL_MASK 0x000000FF
|
||||
#define portMUX_VAL_SHIFT 0
|
||||
|
||||
//Keep this in sync with the portMUX_TYPE struct definition
|
||||
#ifdef portMUX_DEBUG
|
||||
#define portMUX_INITIALIZER_UNLOCKED { portMUX_MAGIC_VAL|portMUX_FREE_VAL }
|
||||
#else
|
||||
#define portMUX_INITIALIZER_UNLOCKED { portMUX_MAGIC_VAL|portMUX_FREE_VAL, "(never locked)", -1 }
|
||||
#endif
|
||||
|
||||
/* Critical section management. NW-TODO: replace XTOS_SET_INTLEVEL with more efficient version, if any? */
|
||||
// These cannot be nested. They should be used with a lot of care and cannot be called from interrupt level.
|
||||
#define portDISABLE_INTERRUPTS() do { XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); portbenchmarkINTERRUPT_DISABLE(); } while (0)
|
||||
|
Reference in New Issue
Block a user