Applied, thanks! Sergey Bugaev, le mer. 27 mars 2024 19:18:35 +0300, a ecrit: > Mark it as noreturn, and make sure to halt, not reboot. > --- > tests/include/testlib.h | 2 +- > tests/testlib.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/include/testlib.h b/tests/include/testlib.h > index a3f3a6a8..cdb2ce13 100644 > --- a/tests/include/testlib.h > +++ b/tests/include/testlib.h > @@ -63,7 +63,7 @@ extern const char* TEST_FAILURE_MARKER; > > const char* e2s(int err); > const char* e2s_gnumach(int err); > -void halt(); > +extern void __attribute__((noreturn)) halt(); > int msleep(uint32_t timeout); > thread_t test_thread_start(task_t task, void(*routine)(void*), void* arg); > > diff --git a/tests/testlib.c b/tests/testlib.c > index 2eaeb591..d2198830 100644 > --- a/tests/testlib.c > +++ b/tests/testlib.c > @@ -23,6 +23,7 @@ > #include <mach/message.h> > #include <mach/mig_errors.h> > #include <mach/vm_param.h> > +#include <sys/reboot.h> > > #include <mach.user.h> > #include <mach_host.user.h> > @@ -55,7 +56,7 @@ mach_port_t device_priv(void) > > void halt() > { > - int ret = host_reboot(host_priv_port, 0); > + int ret = host_reboot(host_priv_port, RB_HALT); > ASSERT_RET(ret, "host_reboot() failed!"); > while (1) > ; > -- > 2.44.0 > >
-- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.