Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / arm-all / kernel / createcontext.c
blob95bcb6cf49e5aade13ad3e800070ced99ab4376f
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Create an empty usable CPU context, ARM version.
6 Lang: english
7 */
9 #include <aros/kernel.h>
10 #include <aros/libcall.h>
12 #include <aros/arm/cpucontext.h>
14 #include <kernel_base.h>
15 #include <kernel_objects.h>
17 AROS_LH0(void *, KrnCreateContext,
18 struct KernelBase *, KernelBase, 18, Kernel)
21 AROS_LIBFUNC_INIT
23 struct ExceptionContext *ctx;
26 * Allocate common data block and FPU data block in one
27 * chunk. This way we simplify things a lot.
29 * On native ports AROSCPUContext can be simply #define'd to ExceptionContext,
30 * so we refer struct AROSCPUContext only for size calculation.
32 ctx = krnAllocCPUContext();
33 if (ctx)
35 ctx->FPUType = KernelBase->kb_ContextFlags;
36 ctx->cpsr = CPUMODE_USER; /* Initial value for user mode */
37 ctx->fpuContext = (APTR)((IPTR)ctx + sizeof(struct AROSCPUContext));
40 return ctx;
42 AROS_LIBFUNC_EXIT