Changeset 04803bf in mainline for kernel/generic/include/arch.h
- Timestamp:
- 2011-03-21T22:00:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 143932e3
- Parents:
- b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/generic/include/arch.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/arch.h
rb50b5af2 r04803bf 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 39 39 #include <proc/thread.h> 40 40 #include <proc/task.h> 41 #include <mm/as.h> 41 42 42 #define DEFAULT_CONTEXT 043 #define DEFAULT_CONTEXT 0 43 44 44 #define CPU THE->cpu45 #define THREAD THE->thread46 #define TASK THE->task47 #define AS THE->as48 #define CONTEXT (THE->task ? THE->task->context : DEFAULT_CONTEXT)49 #define PREEMPTION_DISABLED THE->preemption_disabled45 #define CPU THE->cpu 46 #define THREAD THE->thread 47 #define TASK THE->task 48 #define AS THE->as 49 #define CONTEXT (THE->task ? THE->task->context : DEFAULT_CONTEXT) 50 #define PREEMPTION_DISABLED THE->preemption_disabled 50 51 51 #define context_check(ctx1, ctx2) ((ctx1) == (ctx2))52 #define context_check(ctx1, ctx2) ((ctx1) == (ctx2)) 52 53 53 54 /** … … 57 58 */ 58 59 typedef struct { 59 size_t preemption_disabled; /**< Preemption disabled counter. */60 thread_t *thread; /**< Current thread. */61 task_t *task; /**< Current task. */62 cpu_t *cpu; /**< Executing cpu. */63 as_t *as; /**< Current address space. */60 size_t preemption_disabled; /**< Preemption disabled counter. */ 61 thread_t *thread; /**< Current thread. */ 62 task_t *task; /**< Current task. */ 63 cpu_t *cpu; /**< Executing cpu. */ 64 as_t *as; /**< Current address space. */ 64 65 } the_t; 65 66 67 /* 68 * THE is not an abbreviation, but the English definite article written in 69 * capital letters. It means the current pointer to something, e.g. thread, 70 * processor or address space. Kind reader of this comment shall appreciate 71 * the wit of constructs like THE->thread and similar. 72 */ 66 73 #define THE ((the_t * )(get_stack_base())) 67 74 68 extern void the_initialize(the_t * the);69 extern void the_copy(the_t * src, the_t *dst);75 extern void the_initialize(the_t *); 76 extern void the_copy(the_t *, the_t *); 70 77 71 78 extern void arch_pre_mm_init(void); … … 79 86 extern void reboot(void); 80 87 extern void arch_reboot(void); 81 extern void *arch_construct_function(fncptr_t * fptr, void *addr, void *caller);88 extern void *arch_construct_function(fncptr_t *, void *, void *); 82 89 83 90 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
