kernel: switch to SYS_INIT_NAMED
Update the two locations that use two `SYS_INIT` macros with the same initilisation functions to use `SYS_INIT_NAMED`. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
201902bda1
commit
6f41d52734
@ -52,13 +52,13 @@ static int statics_init(const struct device *unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(statics_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS);
|
||||
SYS_INIT_NAMED(statics_init_pre, statics_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS);
|
||||
|
||||
#if defined(CONFIG_DEMAND_PAGING) && !defined(CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT)
|
||||
/* Need to wait for paging mechanism to be initialized before
|
||||
* heaps that are not in pinned sections can be initialized.
|
||||
*/
|
||||
SYS_INIT(statics_init, POST_KERNEL, 0);
|
||||
SYS_INIT_NAMED(statics_init_post, statics_init, POST_KERNEL, 0);
|
||||
#endif /* CONFIG_DEMAND_PAGING && !CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT */
|
||||
|
||||
void *k_heap_aligned_alloc(struct k_heap *h, size_t align, size_t bytes,
|
||||
|
||||
@ -895,13 +895,15 @@ static int app_shmem_bss_zero(const struct device *unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(app_shmem_bss_zero, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
SYS_INIT_NAMED(app_shmem_bss_zero_pre, app_shmem_bss_zero,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
||||
#if defined(CONFIG_DEMAND_PAGING) && !defined(CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT)
|
||||
/* When BSS sections are not present at boot, we need to wait for
|
||||
* paging mechanism to be initialized before we can zero out BSS.
|
||||
*/
|
||||
SYS_INIT(app_shmem_bss_zero, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
SYS_INIT_NAMED(app_shmem_bss_zero_post, app_shmem_bss_zero,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
#endif /* CONFIG_DEMAND_PAGING && !CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT */
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user