diff --git a/src/kernel/core/Jamfile b/src/kernel/core/Jamfile index aa6d5ff715..053fb97126 100644 --- a/src/kernel/core/Jamfile +++ b/src/kernel/core/Jamfile @@ -32,6 +32,7 @@ KernelMergeObject kernel_core.o : real_time_clock.c scheduler.c sem.c + shutdown.c signal.c system_info.c smp.c diff --git a/src/kernel/core/main.c b/src/kernel/core/main.c index 04b7387682..1a1060ec3b 100644 --- a/src/kernel/core/main.c +++ b/src/kernel/core/main.c @@ -162,15 +162,6 @@ _start(kernel_args *oldka, int cpu_num) } -status_t -shutdown(bool reboot) -{ - sync(); - - return arch_cpu_shutdown(reboot); -} - - static int32 main2(void *unused) { diff --git a/src/kernel/core/shutdown.c b/src/kernel/core/shutdown.c new file mode 100644 index 0000000000..a5bd883c16 --- /dev/null +++ b/src/kernel/core/shutdown.c @@ -0,0 +1,29 @@ +/* + * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Distributed under the terms of the MIT License. + */ + + +#include +#include + + +status_t +shutdown(bool reboot) +{ + // ToDo: shutdown all system services! + + sync(); + + return arch_cpu_shutdown(reboot); +} + + +// #pragma mark - + + +status_t +_user_shutdown(bool reboot) +{ + return shutdown(reboot); +}