mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
subsystem: cleanup misc and make cpp a subsystem
Move a way from misc/ and put in its own subsystem to allow enhancements in the future and make it a core part of Zephyr, not just something misc. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
29
subsys/cpp/cpp_init_array.c
Normal file
29
subsys/cpp/cpp_init_array.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file
|
||||
* @brief Execute initialization routines referenced in .init_array section
|
||||
*/
|
||||
|
||||
typedef void (*func_ptr)(void);
|
||||
|
||||
extern func_ptr __init_array_start[0];
|
||||
extern func_ptr __init_array_end[0];
|
||||
|
||||
/**
|
||||
* @brief Execute initialization routines referenced in .init_array section
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void __do_init_array_aux(void)
|
||||
{
|
||||
for (func_ptr *func = __init_array_start;
|
||||
func < __init_array_end;
|
||||
func++) {
|
||||
(*func)();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user