2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: ShutdownA() - Shut down the operating system.
9 /* Prevent 'timeval redefinition' error */
10 #define timeval timeval_AROS
12 #include <aros/debug.h>
13 #include <proto/exec.h>
15 #include "exec_intern.h"
16 #include "exec_util.h"
18 /* See rom/exec/shutdowna.c for documentation */
20 AROS_LH1(ULONG
, ShutdownA
,
21 AROS_LHA(ULONG
, action
, D0
),
22 struct ExecBase
*, SysBase
, 173, Exec
)
30 case SD_ACTION_POWEROFF
:
34 case SD_ACTION_COLDREBOOT
:
35 exitcode
= 0x81; /* Magic value for our bootstrap */
39 return 0; /* Unknown action code */
42 Exec_DoResetCallbacks((struct IntExecBase
*)SysBase
, action
);
44 PD(SysBase
).SysIFace
->exit(exitcode
);
47 /* Just shut up the compiler, we won't return */