Ignore:
File:
1 edited

Legend:

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

    r98000fb reb239dc  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3939#include <proc/thread.h>
    4040#include <proc/task.h>
     41#include <mm/as.h>
    4142
    42 #define DEFAULT_CONTEXT         0
     43#define DEFAULT_CONTEXT  0
    4344
    44 #define CPU                     THE->cpu
    45 #define THREAD                  THE->thread
    46 #define TASK                    THE->task
    47 #define AS                      THE->as
    48 #define CONTEXT         (THE->task ? THE->task->context : DEFAULT_CONTEXT)
    49 #define PREEMPTION_DISABLED     THE->preemption_disabled
     45#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
    5051
    51 #define context_check(ctx1, ctx2)       ((ctx1) == (ctx2))
     52#define context_check(ctx1, ctx2)  ((ctx1) == (ctx2))
    5253
    5354/**
     
    5758 */
    5859typedef 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. */
    6465} the_t;
    6566
     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 */
    6673#define THE  ((the_t * )(get_stack_base()))
    6774
    68 extern void the_initialize(the_t *the);
    69 extern void the_copy(the_t *src, the_t *dst);
     75extern void the_initialize(the_t *);
     76extern void the_copy(the_t *, the_t *);
    7077
    7178extern void arch_pre_mm_init(void);
     
    7986extern void reboot(void);
    8087extern void arch_reboot(void);
    81 extern void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller);
     88extern void *arch_construct_function(fncptr_t *, void *, void *);
    8289
    8390#endif
Note: See TracChangeset for help on using the changeset viewer.