2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: PrepareContext() - Prepare a task context for dispatch.
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <exec/memory.h>
12 #include <utility/tagitem.h>
14 /*****i***********************************************************************
17 AROS_LH4(BOOL
, PrepareContext
,
20 AROS_LHA(VOLATILE
struct Task
*, task
, A0
),
21 AROS_LHA(APTR
, entryPoint
, A1
),
22 AROS_LHA(APTR
, fallBack
, A2
),
23 AROS_LHA(struct TagItem
*, tagList
, A3
),
26 struct ExecBase
*, SysBase
, 6, Exec
)
29 Prepare the context (set of registers) for a new task.
30 The context/stack will be set so that when the entryPoint
31 function returns, the fallback function will be called.
34 task - Pointer to task
35 entryPoint - Function to call when the new context
37 fallBack - Address of the function to be called
38 when the entryPoint function returns.
39 tagList - Additional options. Like for passing
40 arguments to the entryPoint() functions.
43 TRUE on success. FALSE on failure.
46 This function is private and is not meant to be used
47 by any software. On other operating systems of Amiga(tm) family
50 This function is very CPU dependant. In fact it can differ
51 over different models of the same processor family.
62 ******************************************************************************/
67 * The actual implementation of this function is CPU-specific.
68 * Please see files in arch/<cpu>-all/exec/ for working examples.
73 } /* PrepareContext() */