Moved shutdown() into a separate file.

Added _user_shutdown() and made it available as syscall.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10233 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-25 17:59:13 +00:00
parent d3d7ec98b6
commit 216b269cbc
3 changed files with 30 additions and 9 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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 <kernel.h>
#include <syscalls.h>
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);
}