Define and initialize a static (internal linking) lock for entering critical sections. Use this when all the critical sections are local inside a file. The lock will only be defined if built for a multi-core system, otherwise it is unnecessary. Example usage:
{c}
...
#include "os/critical_section.h"
...
DEFINE_CRIT_SECTION_LOCK_STATIC(my_lock); // will have internal linking (static)
...
esp_os_enter_critical(&my_lock);
...
esp_os_exit_critical(&my_lock);