crete an idle task to run when theres ... umm. .. nothing to do ..
[AROS.git] / compiler / include / rexx / rexxcall.h
bloba07b7fcc2d1747ee3cffbe8e84fb5c31f515945d
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Macro's to make calling arexx library querying functions portable
6 Lang: English
7 */
9 #ifndef REXX_REXXCALL_H
10 #define REXX_REXXCALL_H
12 #include <exec/types.h>
14 #ifdef __mc68000
16 #include <rexx/rexxcall-m68k.h>
18 #else
20 /* Some macro's to make ARexx portable to non-m68k platforms */
21 #define RexxCallQueryLibFunc(rexxmsg, libbase, offset, retargstringptr) \
22 ({ \
23 int _offset=abs(offset)/6; \
24 AROS_LVO_CALL2(ULONG, \
25 AROS_LCA(struct RexxMsg *, rexxmsg, A0), \
26 AROS_LCA(STRPTR *, retargstringptr, A1), \
27 struct Library *, libbase, _offset, rexxcall); \
30 #define AROS_AREXXLIBQUERYFUNC(f,m,lt,l,o,p) \
31 AROS_LH2(ULONG, f, \
32 AROS_LHA(struct RexxMsg *, m, A0), \
33 AROS_LHA(STRPTR *, _retargstringptr, A1), \
34 lt, l, o, p) { AROS_LIBFUNC_INIT
35 #define AROS_AREXXLIBQUERYFUNC_END \
36 AROS_LIBFUNC_EXIT }
38 #define ReturnRexxQuery(rc,arg) \
39 ({ *_retargstringptr = arg; \
40 return rc; \
43 #endif
44 #endif