toolchain: migrate iterable sections calls to the external API
This migrates all the current iterable section usages to the external API, dropping the "Z_" prefix: Z_ITERABLE_SECTION_ROM Z_ITERABLE_SECTION_ROM_GC_ALLOWED Z_ITERABLE_SECTION_RAM Z_ITERABLE_SECTION_RAM_GC_ALLOWED Z_STRUCT_SECTION_ITERABLE Z_STRUCT_SECTION_ITERABLE_ALTERNATE Z_STRUCT_SECTION_FOREACH Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
34d2ca613f
commit
f88a420d69
54 changed files with 188 additions and 190 deletions
|
@ -939,7 +939,7 @@ void bt_conn_cb_register(struct bt_conn_cb *cb);
|
|||
* @param _name Name of callback structure.
|
||||
*/
|
||||
#define BT_CONN_CB_DEFINE(_name) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(bt_conn_cb, \
|
||||
static const STRUCT_SECTION_ITERABLE(bt_conn_cb, \
|
||||
_CONCAT(bt_conn_cb, \
|
||||
_name))
|
||||
|
||||
|
|
|
@ -519,8 +519,8 @@ ssize_t bt_gatt_attr_read_service(struct bt_conn *conn,
|
|||
*/
|
||||
#define BT_GATT_SERVICE_DEFINE(_name, ...) \
|
||||
const struct bt_gatt_attr attr_##_name[] = { __VA_ARGS__ }; \
|
||||
const Z_STRUCT_SECTION_ITERABLE(bt_gatt_service_static, _name) =\
|
||||
BT_GATT_SERVICE(attr_##_name)
|
||||
const STRUCT_SECTION_ITERABLE(bt_gatt_service_static, _name) = \
|
||||
BT_GATT_SERVICE(attr_##_name)
|
||||
|
||||
#define _BT_GATT_ATTRS_ARRAY_DEFINE(n, _instances, _attrs_def) \
|
||||
static struct bt_gatt_attr attrs_##n[] = _attrs_def(_instances[n]);
|
||||
|
|
|
@ -111,7 +111,7 @@ struct bt_mesh_hb_cb {
|
|||
* @param _name Name of callback structure.
|
||||
*/
|
||||
#define BT_MESH_HB_CB_DEFINE(_name) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(bt_mesh_hb_cb, _name)
|
||||
static const STRUCT_SECTION_ITERABLE(bt_mesh_hb_cb, _name)
|
||||
|
||||
/** @brief Get the current Heartbeat publication parameters.
|
||||
*
|
||||
|
|
|
@ -598,10 +598,10 @@ struct bt_mesh_lpn_cb {
|
|||
*
|
||||
* @param _name Name of callback structure.
|
||||
*/
|
||||
#define BT_MESH_LPN_CB_DEFINE(_name) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(bt_mesh_lpn_cb, \
|
||||
_CONCAT(bt_mesh_lpn_cb, \
|
||||
_name))
|
||||
#define BT_MESH_LPN_CB_DEFINE(_name) \
|
||||
static const STRUCT_SECTION_ITERABLE(bt_mesh_lpn_cb, \
|
||||
_CONCAT(bt_mesh_lpn_cb, \
|
||||
_name))
|
||||
|
||||
/** Friend Node callback functions. */
|
||||
struct bt_mesh_friend_cb {
|
||||
|
@ -651,10 +651,10 @@ struct bt_mesh_friend_cb {
|
|||
*
|
||||
* @param _name Name of callback structure.
|
||||
*/
|
||||
#define BT_MESH_FRIEND_CB_DEFINE(_name) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(bt_mesh_friend_cb, \
|
||||
_CONCAT(bt_mesh_friend_cb, \
|
||||
_name))
|
||||
#define BT_MESH_FRIEND_CB_DEFINE(_name) \
|
||||
static const STRUCT_SECTION_ITERABLE(bt_mesh_friend_cb, \
|
||||
_CONCAT(bt_mesh_friend_cb, \
|
||||
_name))
|
||||
|
||||
/** @brief Terminate Friendship.
|
||||
*
|
||||
|
|
|
@ -50,7 +50,7 @@ struct bt_mesh_proxy_cb {
|
|||
* @param _name Name of callback structure.
|
||||
*/
|
||||
#define BT_MESH_PROXY_CB_DEFINE(_name) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE( \
|
||||
static const STRUCT_SECTION_ITERABLE( \
|
||||
bt_mesh_proxy_cb, _CONCAT(bt_mesh_proxy_cb, _name))
|
||||
|
||||
/** @brief Enable advertising with Node Identity.
|
||||
|
|
|
@ -68,8 +68,7 @@ struct cfb_font {
|
|||
* @param _lc Character mapped to last font element.
|
||||
*/
|
||||
#define FONT_ENTRY_DEFINE(_name, _width, _height, _caps, _data, _fc, _lc) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(cfb_font, _name) = \
|
||||
{ \
|
||||
static const STRUCT_SECTION_ITERABLE(cfb_font, _name) = { \
|
||||
.data = _data, \
|
||||
.caps = _caps, \
|
||||
.width = _width, \
|
||||
|
|
|
@ -671,7 +671,7 @@ struct _static_thread_data {
|
|||
prio, options, delay) \
|
||||
K_THREAD_STACK_DEFINE(_k_thread_stack_##name, stack_size); \
|
||||
struct k_thread _k_thread_obj_##name; \
|
||||
Z_STRUCT_SECTION_ITERABLE(_static_thread_data, _k_thread_data_##name) =\
|
||||
STRUCT_SECTION_ITERABLE(_static_thread_data, _k_thread_data_##name) = \
|
||||
Z_THREAD_INITIALIZER(&_k_thread_obj_##name, \
|
||||
_k_thread_stack_##name, stack_size, \
|
||||
entry, p1, p2, p3, prio, options, delay, \
|
||||
|
@ -1352,7 +1352,7 @@ typedef void (*k_timer_stop_t)(struct k_timer *timer);
|
|||
* @param stop_fn Function to invoke if the timer is stopped while running.
|
||||
*/
|
||||
#define K_TIMER_DEFINE(name, expiry_fn, stop_fn) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_timer, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_timer, name) = \
|
||||
Z_TIMER_INITIALIZER(name, expiry_fn, stop_fn)
|
||||
|
||||
/**
|
||||
|
@ -1921,7 +1921,7 @@ __syscall void *k_queue_peek_tail(struct k_queue *queue);
|
|||
* @param name Name of the queue.
|
||||
*/
|
||||
#define K_QUEUE_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_queue, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_queue, name) = \
|
||||
Z_QUEUE_INITIALIZER(name)
|
||||
|
||||
/** @} */
|
||||
|
@ -2243,7 +2243,7 @@ struct k_fifo {
|
|||
* @param name Name of the FIFO queue.
|
||||
*/
|
||||
#define K_FIFO_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_fifo, name) = \
|
||||
STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_fifo, name) = \
|
||||
Z_FIFO_INITIALIZER(name)
|
||||
|
||||
/** @} */
|
||||
|
@ -2367,7 +2367,7 @@ struct k_lifo {
|
|||
* @param name Name of the fifo.
|
||||
*/
|
||||
#define K_LIFO_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_lifo, name) = \
|
||||
STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_lifo, name) = \
|
||||
Z_LIFO_INITIALIZER(name)
|
||||
|
||||
/** @} */
|
||||
|
@ -2501,7 +2501,7 @@ __syscall int k_stack_pop(struct k_stack *stack, stack_data_t *data,
|
|||
#define K_STACK_DEFINE(name, stack_num_entries) \
|
||||
stack_data_t __noinit \
|
||||
_k_stack_buf_##name[stack_num_entries]; \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_stack, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_stack, name) = \
|
||||
Z_STACK_INITIALIZER(name, _k_stack_buf_##name, \
|
||||
stack_num_entries)
|
||||
|
||||
|
@ -2569,7 +2569,7 @@ struct k_mutex {
|
|||
* @param name Name of the mutex.
|
||||
*/
|
||||
#define K_MUTEX_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_mutex, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_mutex, name) = \
|
||||
Z_MUTEX_INITIALIZER(name)
|
||||
|
||||
/**
|
||||
|
@ -2708,7 +2708,7 @@ __syscall int k_condvar_wait(struct k_condvar *condvar, struct k_mutex *mutex,
|
|||
* @param name Name of the condition variable.
|
||||
*/
|
||||
#define K_CONDVAR_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_condvar, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_condvar, name) = \
|
||||
Z_CONDVAR_INITIALIZER(name)
|
||||
/**
|
||||
* @}
|
||||
|
@ -2851,7 +2851,7 @@ static inline unsigned int z_impl_k_sem_count_get(struct k_sem *sem)
|
|||
* @param count_limit Maximum permitted semaphore count.
|
||||
*/
|
||||
#define K_SEM_DEFINE(name, initial_count, count_limit) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_sem, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_sem, name) = \
|
||||
Z_SEM_INITIALIZER(name, initial_count, count_limit); \
|
||||
BUILD_ASSERT(((count_limit) != 0) && \
|
||||
((initial_count) <= (count_limit)) && \
|
||||
|
@ -4214,7 +4214,7 @@ struct k_msgq_attrs {
|
|||
#define K_MSGQ_DEFINE(q_name, q_msg_size, q_max_msgs, q_align) \
|
||||
static char __noinit __aligned(q_align) \
|
||||
_k_fifo_buf_##q_name[(q_max_msgs) * (q_msg_size)]; \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_msgq, q_name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_msgq, q_name) = \
|
||||
Z_MSGQ_INITIALIZER(q_name, _k_fifo_buf_##q_name, \
|
||||
q_msg_size, q_max_msgs)
|
||||
|
||||
|
@ -4466,7 +4466,7 @@ struct k_mbox {
|
|||
* @param name Name of the mailbox.
|
||||
*/
|
||||
#define K_MBOX_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_mbox, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_mbox, name) = \
|
||||
Z_MBOX_INITIALIZER(name) \
|
||||
|
||||
/**
|
||||
|
@ -4620,9 +4620,9 @@ struct k_pipe {
|
|||
*
|
||||
*/
|
||||
#define K_PIPE_DEFINE(name, pipe_buffer_size, pipe_align) \
|
||||
static unsigned char __noinit __aligned(pipe_align) \
|
||||
static unsigned char __noinit __aligned(pipe_align) \
|
||||
_k_pipe_buf_##name[pipe_buffer_size]; \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_pipe, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_pipe, name) = \
|
||||
Z_PIPE_INITIALIZER(name, _k_pipe_buf_##name, pipe_buffer_size)
|
||||
|
||||
/**
|
||||
|
@ -4800,7 +4800,7 @@ struct k_mem_slab {
|
|||
#define K_MEM_SLAB_DEFINE(name, slab_block_size, slab_num_blocks, slab_align) \
|
||||
char __noinit __aligned(WB_UP(slab_align)) \
|
||||
_k_mem_slab_buf_##name[(slab_num_blocks) * WB_UP(slab_block_size)]; \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_mem_slab, name) = \
|
||||
STRUCT_SECTION_ITERABLE(k_mem_slab, name) = \
|
||||
Z_MEM_SLAB_INITIALIZER(name, _k_mem_slab_buf_##name, \
|
||||
WB_UP(slab_block_size), slab_num_blocks)
|
||||
|
||||
|
@ -5025,7 +5025,7 @@ void k_heap_free(struct k_heap *h, void *mem);
|
|||
#define K_HEAP_DEFINE(name, bytes) \
|
||||
char __aligned(8) /* CHUNK_UNIT */ \
|
||||
kheap_##name[MAX(bytes, Z_HEAP_MIN_SIZE)]; \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_heap, name) = { \
|
||||
STRUCT_SECTION_ITERABLE(k_heap, name) = { \
|
||||
.heap = { \
|
||||
.init_mem = kheap_##name, \
|
||||
.init_bytes = MAX(bytes, Z_HEAP_MIN_SIZE), \
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
#if defined(CONFIG_NETWORKING)
|
||||
#ifndef NETWORK_RAM_SECTIONS
|
||||
#define NETWORK_RAM_SECTIONS \
|
||||
Z_ITERABLE_SECTION_RAM(net_if, 4) \
|
||||
Z_ITERABLE_SECTION_RAM(net_if_dev, 4) \
|
||||
Z_ITERABLE_SECTION_RAM(net_l2, 4) \
|
||||
Z_ITERABLE_SECTION_RAM(eth_bridge, 4)
|
||||
ITERABLE_SECTION_RAM(net_if, 4) \
|
||||
ITERABLE_SECTION_RAM(net_if_dev, 4) \
|
||||
ITERABLE_SECTION_RAM(net_l2, 4) \
|
||||
ITERABLE_SECTION_RAM(eth_bridge, 4)
|
||||
#endif
|
||||
#endif /* NETWORKING */
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
__log_dynamic_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
Z_ITERABLE_SECTION_RAM(_static_thread_data, 4)
|
||||
ITERABLE_SECTION_RAM(_static_thread_data, 4)
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
/* All kernel objects within are assumed to be either completely
|
||||
|
@ -66,18 +66,18 @@
|
|||
_static_kernel_objects_begin = .;
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
|
||||
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
|
||||
ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4)
|
||||
|
||||
SECTION_DATA_PROLOGUE(_net_buf_pool_area,,SUBALIGN(4))
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
/* Build-time assignment of permissions to kernel objects to
|
||||
* threads declared with K_THREAD_DEFINE()
|
||||
*/
|
||||
Z_ITERABLE_SECTION_ROM(z_object_assignment, 4)
|
||||
ITERABLE_SECTION_ROM(z_object_assignment, 4)
|
||||
#endif
|
||||
|
||||
SECTION_DATA_PROLOGUE(app_shmem_regions,,)
|
||||
|
@ -102,53 +102,53 @@
|
|||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
#if defined(CONFIG_NET_SOCKETS)
|
||||
Z_ITERABLE_SECTION_ROM(net_socket_register, 4)
|
||||
ITERABLE_SECTION_ROM(net_socket_register, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NET_L2_PPP)
|
||||
Z_ITERABLE_SECTION_ROM(ppp_protocol_handler, 4)
|
||||
ITERABLE_SECTION_ROM(ppp_protocol_handler, 4)
|
||||
#endif
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(bt_l2cap_fixed_chan, 4)
|
||||
ITERABLE_SECTION_ROM(bt_l2cap_fixed_chan, 4)
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
Z_ITERABLE_SECTION_ROM(bt_l2cap_br_fixed_chan, 4)
|
||||
ITERABLE_SECTION_ROM(bt_l2cap_br_fixed_chan, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
Z_ITERABLE_SECTION_ROM(bt_conn_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_conn_cb, 4)
|
||||
#endif
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(bt_gatt_service_static, 4)
|
||||
ITERABLE_SECTION_ROM(bt_gatt_service_static, 4)
|
||||
|
||||
#if defined(CONFIG_BT_MESH)
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_subnet_cb, 4)
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_app_key_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_subnet_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_app_key_cb, 4)
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_hb_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_hb_cb, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_MESH_FRIEND)
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_friend_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_friend_cb, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_MESH_LOW_POWER)
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_lpn_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_lpn_cb, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_MESH_GATT_PROXY)
|
||||
Z_ITERABLE_SECTION_ROM(bt_mesh_proxy_cb, 4)
|
||||
ITERABLE_SECTION_ROM(bt_mesh_proxy_cb, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EC_HOST_CMD)
|
||||
Z_ITERABLE_SECTION_ROM(ec_host_cmd_handler, 4)
|
||||
ITERABLE_SECTION_ROM(ec_host_cmd_handler, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SETTINGS)
|
||||
Z_ITERABLE_SECTION_ROM(settings_handler_static, 4)
|
||||
ITERABLE_SECTION_ROM(settings_handler_static, 4)
|
||||
#endif
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(k_p4wq_initparam, 4)
|
||||
ITERABLE_SECTION_ROM(k_p4wq_initparam, 4)
|
||||
|
||||
#if defined(CONFIG_EMUL)
|
||||
SECTION_DATA_PROLOGUE(emulators_section,,)
|
||||
|
@ -160,7 +160,7 @@
|
|||
#endif /* CONFIG_EMUL */
|
||||
|
||||
#if defined(CONFIG_DNS_SD)
|
||||
Z_ITERABLE_SECTION_ROM(dns_sd_rec, 4)
|
||||
ITERABLE_SECTION_ROM(dns_sd_rec, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PCIE)
|
||||
|
@ -193,7 +193,7 @@
|
|||
__log_backends_end = .;
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(shell, 4)
|
||||
ITERABLE_SECTION_ROM(shell, 4)
|
||||
|
||||
SECTION_DATA_PROLOGUE(shell_root_cmds_sections,,)
|
||||
{
|
||||
|
@ -209,7 +209,7 @@
|
|||
__font_entry_end = .;
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
Z_ITERABLE_SECTION_ROM(tracing_backend, 4)
|
||||
ITERABLE_SECTION_ROM(tracing_backend, 4)
|
||||
|
||||
SECTION_DATA_PROLOGUE(zephyr_dbg_info,,)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ extern const struct log_backend __log_backends_end[];
|
|||
.id = 0, \
|
||||
.active = false, \
|
||||
}; \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(log_backend, _name) = \
|
||||
static const STRUCT_SECTION_ITERABLE(log_backend, _name) = \
|
||||
{ \
|
||||
.api = &_api, \
|
||||
.cb = &UTIL_CAT(backend_cb_, _name), \
|
||||
|
|
|
@ -79,7 +79,7 @@ struct ec_host_cmd_handler {
|
|||
*/
|
||||
#define EC_HOST_CMD_HANDLER(_function, _id, _version_mask, _request_type, \
|
||||
_response_type) \
|
||||
const Z_STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
|
||||
const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
|
||||
.id = _id, \
|
||||
.handler = _function, \
|
||||
.version_mask = _version_mask, \
|
||||
|
@ -100,7 +100,7 @@ struct ec_host_cmd_handler {
|
|||
* supports. E.g. BIT(0) corresponse to version 0.
|
||||
*/
|
||||
#define EC_HOST_CMD_HANDLER_UNBOUND(_function, _id, _version_mask) \
|
||||
const Z_STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
|
||||
const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
|
||||
.id = _id, \
|
||||
.handler = _function, \
|
||||
.version_mask = _version_mask, \
|
||||
|
|
|
@ -76,7 +76,7 @@ extern "C" {
|
|||
*/
|
||||
#define DNS_SD_REGISTER_SERVICE(id, instance, service, proto, domain, \
|
||||
text, port) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(dns_sd_rec, id) = { \
|
||||
static const STRUCT_SECTION_ITERABLE(dns_sd_rec, id) = { \
|
||||
instance, \
|
||||
service, \
|
||||
proto, \
|
||||
|
|
|
@ -51,7 +51,7 @@ struct eth_bridge {
|
|||
* @param name Name of the bridge object
|
||||
*/
|
||||
#define ETH_BRIDGE_INIT(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(eth_bridge, name) = \
|
||||
STRUCT_SECTION_ITERABLE(eth_bridge, name) = \
|
||||
ETH_BRIDGE_INITIALIZER(name)
|
||||
|
||||
struct eth_bridge_iface_context {
|
||||
|
|
|
@ -2210,7 +2210,7 @@ struct net_if_api {
|
|||
((struct net_if *)&NET_IF_GET_NAME(dev_name, sfx))
|
||||
|
||||
#define NET_IF_INIT(dev_name, sfx, _l2, _mtu, _num_configs) \
|
||||
static Z_STRUCT_SECTION_ITERABLE(net_if_dev, \
|
||||
static STRUCT_SECTION_ITERABLE(net_if_dev, \
|
||||
NET_IF_DEV_GET_NAME(dev_name, sfx)) = { \
|
||||
.dev = &(DEVICE_NAME_GET(dev_name)), \
|
||||
.l2 = &(NET_L2_GET_NAME(_l2)), \
|
||||
|
@ -2228,7 +2228,7 @@ struct net_if_api {
|
|||
}
|
||||
|
||||
#define NET_IF_OFFLOAD_INIT(dev_name, sfx, _mtu) \
|
||||
static Z_STRUCT_SECTION_ITERABLE(net_if_dev, \
|
||||
static STRUCT_SECTION_ITERABLE(net_if_dev, \
|
||||
NET_IF_DEV_GET_NAME(dev_name, sfx)) = { \
|
||||
.dev = &(DEVICE_NAME_GET(dev_name)), \
|
||||
.mtu = _mtu, \
|
||||
|
|
|
@ -133,8 +133,8 @@ NET_L2_DECLARE_PUBLIC(CANBUS_L2);
|
|||
#endif /* CONFIG_NET_L2_CANBUS */
|
||||
|
||||
#define NET_L2_INIT(_name, _recv_fn, _send_fn, _enable_fn, _get_flags_fn) \
|
||||
const Z_STRUCT_SECTION_ITERABLE(net_l2, \
|
||||
NET_L2_GET_NAME(_name)) = { \
|
||||
const STRUCT_SECTION_ITERABLE(net_l2, \
|
||||
NET_L2_GET_NAME(_name)) = { \
|
||||
.recv = (_recv_fn), \
|
||||
.send = (_send_fn), \
|
||||
.enable = (_enable_fn), \
|
||||
|
|
|
@ -884,7 +884,7 @@ struct net_socket_register {
|
|||
(__net_socket_register_##socket_name)
|
||||
|
||||
#define NET_SOCKET_REGISTER(socket_name, _family, _is_supported, _handler) \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(net_socket_register, \
|
||||
static const STRUCT_SECTION_ITERABLE(net_socket_register, \
|
||||
NET_SOCKET_GET_NAME(socket_name)) = { \
|
||||
.family = _family, \
|
||||
.is_supported = _is_supported, \
|
||||
|
|
|
@ -199,8 +199,8 @@ struct settings_handler_static {
|
|||
|
||||
#define SETTINGS_STATIC_HANDLER_DEFINE(_hname, _tree, _get, _set, _commit, \
|
||||
_export) \
|
||||
const Z_STRUCT_SECTION_ITERABLE(settings_handler_static, \
|
||||
settings_handler_ ## _hname) = { \
|
||||
const STRUCT_SECTION_ITERABLE(settings_handler_static, \
|
||||
settings_handler_ ## _hname) = { \
|
||||
.name = _tree, \
|
||||
.h_get = _get, \
|
||||
.h_set = _set, \
|
||||
|
|
|
@ -771,7 +771,7 @@ extern void z_shell_print_stream(const void *user_ctx, const char *data,
|
|||
Z_SHELL_STATS_DEFINE(_name); \
|
||||
static K_KERNEL_STACK_DEFINE(_name##_stack, CONFIG_SHELL_STACK_SIZE); \
|
||||
static struct k_thread _name##_thread; \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(shell, _name) = { \
|
||||
static const STRUCT_SECTION_ITERABLE(shell, _name) = { \
|
||||
.default_prompt = _prompt, \
|
||||
.iface = _transport_iface, \
|
||||
.ctx = &UTIL_CAT(_name, _ctx), \
|
||||
|
|
|
@ -110,7 +110,7 @@ struct z_object_assignment {
|
|||
#define K_THREAD_ACCESS_GRANT(name_, ...) \
|
||||
static void * const _CONCAT(_object_list_, name_)[] = \
|
||||
{ __VA_ARGS__, NULL }; \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(z_object_assignment, \
|
||||
static const STRUCT_SECTION_ITERABLE(z_object_assignment, \
|
||||
_CONCAT(_object_access_, name_)) = \
|
||||
{ (&_k_thread_obj_ ## name_), \
|
||||
(_CONCAT(_object_list_, name_)) }
|
||||
|
|
|
@ -100,8 +100,8 @@ struct k_p4wq_initparam {
|
|||
n_threads, stack_sz); \
|
||||
static struct k_thread _p4threads_##name[n_threads]; \
|
||||
static struct k_p4wq name; \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(k_p4wq_initparam, \
|
||||
_init_##name) = { \
|
||||
static const STRUCT_SECTION_ITERABLE(k_p4wq_initparam, \
|
||||
_init_##name) = { \
|
||||
.num = n_threads, \
|
||||
.stack_size = stack_sz, \
|
||||
.threads = _p4threads_##name, \
|
||||
|
@ -127,8 +127,8 @@ struct k_p4wq_initparam {
|
|||
n_threads, stack_sz); \
|
||||
static struct k_thread _p4threads_##name[n_threads]; \
|
||||
static struct k_p4wq name[n_threads]; \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(k_p4wq_initparam, \
|
||||
_init_##name) = { \
|
||||
static const STRUCT_SECTION_ITERABLE(k_p4wq_initparam, \
|
||||
_init_##name) = { \
|
||||
.num = n_threads, \
|
||||
.stack_size = stack_sz, \
|
||||
.threads = _p4threads_##name, \
|
||||
|
|
|
@ -71,7 +71,7 @@ struct sys_sem {
|
|||
* are identical and can be treated as a k_sem in the boot initialization code
|
||||
*/
|
||||
#define SYS_SEM_DEFINE(_name, _initial_count, _count_limit) \
|
||||
Z_STRUCT_SECTION_ITERABLE_ALTERNATE(k_sem, sys_sem, _name) = { \
|
||||
STRUCT_SECTION_ITERABLE_ALTERNATE(k_sem, sys_sem, _name) = { \
|
||||
.kernel_sem = Z_SEM_INITIALIZER(_name.kernel_sem, \
|
||||
_initial_count, _count_limit) \
|
||||
}; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue