1 |*****************************************************************************
5 | __AROS_LH1(void, StackSwap
,
8 | __AROS_LA(struct StackSwapStruct
*, newStack
, A0
),
11 | struct ExecBase
*, SysBase
, 122, Exec
)
14 | This function switches to the
new stack given by the parameters in the
15 | stackswapstruct structure
. The old stack parameters are returned in
16 | the same structure so that the stack can be restored later
19 | newStack
- parameters
for the
new stack
35 |******************************************************************************
42 .globl _Exec_StackSwap
44 | Preserve returnaddress
and fix sp
47 | Get pointer to tc_SPLower in
a1 (tc_SPUpper is next
)
48 movel a6@
(ThisTask
),a1
49 leal a1@
(tc_SPLower
),a1
51 | Just to be sure interrupts always find a good stackframe
54 | Swap Lower boundaries
59 | Swap higher boundaries
69 | Reenable interrupts
.
72 | Restore returnaddress
and return