1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2021-04-27     flybreak     the first version.
9  */
10 
11 #include <arm-tpl.h>
12 
__ARM_TPL_execute_once(__ARM_TPL_exec_once_flag * __flag,void (* __init_routine)(void))13 extern "C" int __ARM_TPL_execute_once(__ARM_TPL_exec_once_flag *__flag,
14                                       void (*__init_routine)(void))
15 {
16     if (*__flag == 0)
17     {
18         __init_routine();
19         *__flag = 1;
20     }
21     return 0;
22 }
23