esp_cpu_compare_and_set() function
Atomic compare-and-set operation
Arguments
addr
Address of atomic variable
compare_value
Value to compare the atomic variable to
new_value
New value to set the atomic variable to
Return value
Whether the atomic variable was set or not
![]()
if (esp_cpu_compare_and_set((volatile uint32_t *)&once_control->init_executed, 0, 1)) {
esp_cpu_compare_and_set() is called by 3 functions and calls 1 function:
![]()
esp_cpu_compare_and_set()
esp_cpu_compare_and_set() writes 1 variable:
![]()
esp_cpu_compare_and_set()