1 #include <aros/kernel.h>
2 #include <aros/libcall.h>
4 #include <kernel_base.h>
5 #include <kernel_cpu.h>
6 #include <kernel_objects.h>
8 /*****************************************************************************
11 #include <proto/kernel.h>
13 AROS_LH0(void *, KrnCreateContext
,
18 struct KernelBase
*, KernelBase
, 18, Kernel
)
21 Allocate and initialize CPU context storage area.
27 A pointer to a CPU context storage area.
30 CPU context storage is considered private and accessible
31 only from within supevisor mode.
42 ******************************************************************************/
46 struct AROSCPUContext
*ctx
;
47 cpumode_t mode
= goSuper();
49 /* Our context is accessible only in supervisor mode */
50 ctx
= krnAllocCPUContext();
52 /* Initialize the storage if needed */
53 #ifdef PREPARE_INITIAL_CONTEXT
55 PREPARE_INITIAL_CONTEXT(ctx
);