Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/arch.h

    r473d5d2 reb239dc  
    4141#include <mm/as.h>
    4242
    43 /*
    44  * THE is not an abbreviation, but the English definite article written in
    45  * capital letters. It means the current pointer to something, e.g. thread,
    46  * processor or address space. Kind reader of this comment shall appreciate
    47  * the wit of constructs like THE->thread and similar.
    48  */
    49 #define THE  ((the_t * )(get_stack_base()))
     43#define DEFAULT_CONTEXT  0
    5044
    5145#define CPU                  THE->cpu
     
    5347#define TASK                 THE->task
    5448#define AS                   THE->as
     49#define CONTEXT              (THE->task ? THE->task->context : DEFAULT_CONTEXT)
    5550#define PREEMPTION_DISABLED  THE->preemption_disabled
    56 #define MAGIC                UINT32_C(0xfacefeed)
    5751
    58 #define container_check(ctn1, ctn2)  ((ctn1) == (ctn2))
    59 
    60 #define DEFAULT_CONTAINER  0
    61 #define CONTAINER \
    62         ((THE->task) ? (THE->task->container) : (DEFAULT_CONTAINER))
     52#define context_check(ctx1, ctx2)  ((ctx1) == (ctx2))
    6353
    6454/**
     
    7363        cpu_t *cpu;                  /**< Executing cpu. */
    7464        as_t *as;                    /**< Current address space. */
    75         uint32_t magic;              /**< Magic value */
    7665} the_t;
     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 */
     73#define THE  ((the_t * )(get_stack_base()))
    7774
    7875extern void the_initialize(the_t *);
Note: See TracChangeset for help on using the changeset viewer.