Subversion Repositories HelenOS

Rev

Rev 1820 | Rev 1881 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1820 Rev 1839
Line 41... Line 41...
41
 
41
 
42
#include <cpu.h>
42
#include <cpu.h>
43
#include <arch/cpu.h>
43
#include <arch/cpu.h>
44
#include <arch/asm.h> 
44
#include <arch/asm.h> 
45
 
45
 
-
 
46
#define DEFAULT_CONTEXT     0
-
 
47
 
46
#define CPU         THE->cpu
48
#define CPU         THE->cpu
47
#define THREAD          THE->thread
49
#define THREAD          THE->thread
48
#define TASK            THE->task
50
#define TASK            THE->task
49
#define AS          THE->as
51
#define AS          THE->as
-
 
52
#define CONTEXT     (THE->task ? THE->task->context : DEFAULT_CONTEXT)
50
#define PREEMPTION_DISABLED THE->preemption_disabled
53
#define PREEMPTION_DISABLED THE->preemption_disabled
51
 
54
 
-
 
55
#define context_check(ctx1, ctx2)   ((ctx1) == (ctx2))
-
 
56
 
52
/**
57
/**
53
 * For each possible kernel stack, structure
58
 * For each possible kernel stack, structure
54
 * of the following type will be placed at
59
 * of the following type will be placed at
55
 * the base address of the stack.
60
 * the base address of the stack.
56
 */
61
 */
Line 58... Line 63...
58
    count_t preemption_disabled;    /**< Preemption disabled counter. */
63
    count_t preemption_disabled;    /**< Preemption disabled counter. */
59
    thread_t *thread;       /**< Current thread. */
64
    thread_t *thread;       /**< Current thread. */
60
    task_t *task;           /**< Current task. */
65
    task_t *task;           /**< Current task. */
61
    cpu_t *cpu;         /**< Executing cpu. */
66
    cpu_t *cpu;         /**< Executing cpu. */
62
    as_t *as;           /**< Current address space. */
67
    as_t *as;           /**< Current address space. */
63
    context_id_t context;   /**< Current security context. */
-
 
64
};
68
};
65
 
69
 
66
#define THE     ((the_t *)(get_stack_base()))   
70
#define THE     ((the_t *)(get_stack_base()))
67
 
71
 
68
extern void the_initialize(the_t *the);
72
extern void the_initialize(the_t *the);
69
extern void the_copy(the_t *src, the_t *dst);
73
extern void the_copy(the_t *src, the_t *dst);
70
 
74
 
71
extern void arch_pre_main(void);
75
extern void arch_pre_main(void);