2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
8 #include <aros/kernel.h>
9 #include <aros/libcall.h>
11 #include <kernel_base.h>
12 #include <kernel_cpu.h>
13 #include <kernel_objects.h>
15 /*****************************************************************************
18 #include <proto/kernel.h>
20 AROS_LH0(void *, KrnCreateContext
,
25 struct KernelBase
*, KernelBase
, 18, Kernel
)
28 Allocate and initialize CPU context storage area.
34 A pointer to a CPU context storage area.
37 CPU context storage is considered private and accessible
38 only from within supevisor mode.
49 ******************************************************************************/
53 struct AROSCPUContext
*ctx
;
54 cpumode_t mode
= goSuper();
56 /* Our context is accessible only in supervisor mode */
57 ctx
= krnAllocCPUContext();
59 /* Initialize the storage if needed */
60 #ifdef PREPARE_INITIAL_CONTEXT
62 PREPARE_INITIAL_CONTEXT(ctx
);