2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: PrepareContext() - Prepare a task context for dispatch.
9 #include <exec/types.h>
10 #include <aros/libcall.h>
11 #include <exec/execbase.h>
12 #include <utility/tagitem.h>
14 /*****i***********************************************************************
17 AROS_LH4(BOOL
, PrepareContext
,
20 AROS_LHA(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 very CPU dependant. In fact it can differ
47 over different models of the same processor family.
57 This function is required to be implemented in the $(KERNEL).
59 ******************************************************************************/
63 /* This function is too CPU dependant to be described here, but
64 basically you effectively do a state save (similar to in
65 Dispatch()) but of a context that has not been run yet.
69 #error The PrepareContext() function was not implemented in the kernel.
73 } /* PrepareContext() */