use LibPlatSupportHaveTimer instead of inverse

As suggested by Indan to be clearer to understand.
https://github.com/seL4/util_libs/pull/196#issuecomment-2918974119

Signed-off-by: julia <git.ts@trainwit.ch>
This commit is contained in:
julia 2025-05-30 12:51:26 +10:00 committed by Indan Zupancic
parent 2c86e18705
commit 959d4c38b8
1 changed files with 4 additions and 4 deletions

View File

@ -146,7 +146,7 @@ int sel4platsupport_init_default_timer_ops(vka_t *vka, UNUSED vspace_t *vspace,
return EINVAL;
}
#ifndef CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER
#ifdef CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER
error = ltimer_default_describe(&timer->ltimer, ops);
if (!error) {
@ -165,7 +165,7 @@ int sel4platsupport_init_default_timer_ops(vka_t *vka, UNUSED vspace_t *vspace,
}
#else
error = ENOSYS;
#endif
#endif /* CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER */
return error;
}
@ -214,7 +214,7 @@ int sel4platsupport_init_default_timer_caps(vka_t *vka, vspace_t *vspace, simple
/* Allocate timer irqs. */
ltimer_t ltimer;
#ifndef CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER
#ifdef CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER
error = ltimer_default_describe(&ltimer, ops);
if (error) {
ZF_LOGE("Failed to describe default timer");
@ -222,7 +222,7 @@ int sel4platsupport_init_default_timer_caps(vka_t *vka, vspace_t *vspace, simple
}
#else
return ENOSYS;
#endif /* CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER */
#endif /* CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER */
/* set up the irq caps the timer needs */
size_t nirqs = get_nirqs(&ltimer);