How to set the "output lock"?

i found a logging in github. https://github.com/armink/EasyLogger
He needs to configure something.
__enable_irq() __disable_irq() What are the names of these two functions in pros?

/**
 * output log port interface
 *
 * @param log output of log
 * @param size log size
 */
void elog_port_output(const char *log, size_t size)
{
    /* output to terminal */
    printf("%.*s", size, log);
    //TODO output to flash
}

/**
 * output lock
 */
void elog_port_output_lock(void)
{
    //__disable_irq();
}

/**
 * output unlock
 */
void elog_port_output_unlock(void)
{
    //__enable_irq();
}

These functions exist in an internal kernel API, but you don’t need them since the kernel properly handles concurrent writes.

2 Likes