linker: Allow for 999 priority levels in init levels

Some projects may have needs for more than 99 priority levels, so add
a third linker input section for each obj level.

Signed-off-by: Josh DeWitt <josh.dewitt@garmin.com>
This commit is contained in:
Josh DeWitt 2025-03-12 11:29:01 -05:00 committed by Anas Nashif
commit 0ae0c3dc44
5 changed files with 13 additions and 6 deletions

View file

@ -271,10 +271,11 @@ SYS_INIT_NAMED(init1, init_fn, APPLICATION, 1);
SYS_INIT_NAMED(init2, init_fn, APPLICATION, 2);
SYS_INIT_NAMED(init3, init_fn, APPLICATION, 2);
SYS_INIT_NAMED(init4, init_fn, APPLICATION, 99);
SYS_INIT_NAMED(init5, init_fn, APPLICATION, 999);
ZTEST(device, test_sys_init_multiple)
{
zassert_equal(sys_init_counter, 5, "");
zassert_equal(sys_init_counter, 6, "");
}
/* this is for storing sequence during initialization */