use the correct acpi status check. don't try to call the acpi function if acpi isnt...
[AROS.git] / test / dos / exit.c
blobd9a3736b453ec6f873042340a95720288b9b02fa
1 /*
2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/dos.h>
9 struct DosLibrary *DOSBase;
10 static unsigned int level = 0;
12 void test()
14 Printf("Nest level: %lu\n", ++level);
16 if (level < 20)
17 test();
19 Exit(0);
20 Printf("Exit() did not work!\n");
23 __startup static AROS_PROCH(Start, argstr, argsize, SysBase)
25 AROS_PROCFUNC_INIT
27 struct Process *me;
28 IPTR *stackbase;
30 DOSBase = (struct DosLibrary *)OpenLibrary("dos.library", 36);
31 if (!DOSBase)
32 return RETURN_FAIL;
34 /* Let's check correctness of stack size passing */
35 me = (struct Process *)FindTask(NULL);
36 stackbase = me->pr_ReturnAddr;
37 Printf("Launch stack size is %ld, total size is %ld\n", stackbase[0],
38 me->pr_Task.tc_SPUpper - me->pr_Task.tc_SPLower);
40 test();
42 CloseLibrary(&DOSBase->dl_lib);
43 return RETURN_OK;
45 AROS_PROCFUNC_EXIT