| Q D E V _ H L P _ T A S K D E C L ( )
| | | | | SOURCE: qdev_macros.txt 1.16 (12/09/2014) English AMIGA - PUBLIC
----------------------------------------------------------------------------
NAME
QDEV_HLP_TASKDECL() - Blasts subtask code in a special
manner.
SYNOPSIS
QDEV_HLP_TASKDECL(fmod, symbol, code)
QDEV_HLP_TASKDECL(<fmod>, <symbol>, <code>)
FUNCTION
This macro was created for two reasons. 1) To wrap code
so that LFRA is to be found on stack and 2) to balance
I/O in the debug support since task function must never
return.
INPUTS
fmod - Function modifiers like 'static' for instance.
Can be totally omitted as well.
symbol - Function name. Quite essential.
code - Code that this function will carry. The syntax
does not differ from normal function body.
RETURNS
No output.
BASES
SysBase
NOTES
This macro defines SysBase implicitly to call task rem.
function 'RemTask()'. You must not call it in 'code'!
SEE ALSO
QDEV_HLP_PROCDECL()
EXAMPLE
#include <proto/exec.h>
#include <exec/execbase.h>
#include <proto/dos.h>
#include <qdev.h>
QDEV_HLP_TASKDECL
(
, myfunction,
struct ExecBase *SysBase = *((struct ExecBase **)4);
Wait(SIGBREAKF_CTRL_C);
...
Forbid();
)
...
BUGS
None known.
----------------------------------------------------------------------------
| |
| |