revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-all / dos / exit.c
blob4cc7ab8767d6cd6ceb9682788c12d59b0bc0c4f4
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <aros/debug.h>
10 #include <aros/asmcall.h>
12 #include "dos_intern.h"
14 AROS_UFP2(ULONG, BCPL_Exit,
15 AROS_UFPA(LONG, returnCode, D1),
16 AROS_UFPA(struct DosLibrary *, DOSBase, A6));
18 AROS_LH1(void, Exit,
19 AROS_LHA(LONG, returnCode, D1),
20 struct DosLibrary *, DOSBase, 24, Dos)
22 AROS_LIBFUNC_INIT
24 AROS_UFC2(ULONG, BCPL_Exit,
25 AROS_UFCA(LONG, returnCode, D1),
26 AROS_UFCA(struct DosLibrary *, DOSBase, A6));
28 AROS_LIBFUNC_EXIT
31 extern ULONG AOS_CallEntry(void);
34 * This entry code is used by CreateNewProc(). It supposes that it calls
35 * normal C code and follows AROS ABI conventions by putting SysBase into A6.
36 * Note that it still needs to set pr_ReturnAddr.
37 * pr_ReturnAddr value is used by AROS libc as program identifier (it is
38 * supposed to contain a unique value per program).
40 ULONG CallEntry(STRPTR argptr, ULONG argsize, LONG_FUNC entry, struct Process *me)
42 return AROS_UFC6(ULONG, AOS_CallEntry,
43 AROS_UFCA(ULONG, argsize, D0),
44 AROS_UFCA(STRPTR, argptr, A0),
45 AROS_UFCA(APTR, me->pr_Task.tc_SPLower, A1),
46 AROS_UFCA(APTR, me->pr_GlobVec, A2),
47 AROS_UFCA(APTR, &me->pr_ReturnAddr, A3),
48 AROS_UFCA(LONG_FUNC, entry, A4));