Changeset 91a8f83 in mainline for kernel/generic/include/arch.h


Ignore:
Timestamp:
2018-10-31T18:15:56Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
071cb36
Parents:
482f968
Message:

Rename THE/the_t to CURRENT/current_t

Because the word "THE" occurs several times in every licence
header, searching for occurences of "THE" macro is more difficult
than necessary.

While I appreciate the wit of it, using a nonconflicting word
for it is more practical.

File:
1 edited

Legend:

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

    r482f968 r91a8f83  
    4040
    4141/*
    42  * THE is not an abbreviation, but the English definite article written in
    43  * capital letters. It means the current pointer to something, e.g. thread,
    44  * processor or address space. Kind reader of this comment shall appreciate
    45  * the wit of constructs like THE->thread and similar.
     42 * The context pointer. The current_t structure holds pointers to various parts
     43 * of the current execution context, like running task, thread, address space,
     44 * etc.
    4645 */
    47 #define THE  ((the_t * )(get_stack_base()))
     46#define CURRENT  ((current_t * )(get_stack_base()))
    4847
    4948#define MAGIC                UINT32_C(0xfacefeed)
     
    5352#define DEFAULT_CONTAINER  0
    5453#define CONTAINER \
    55         ((THE->task) ? (THE->task->container) : (DEFAULT_CONTAINER))
     54        ((CURRENT->task) ? (CURRENT->task->container) : (DEFAULT_CONTAINER))
    5655
    5756/* Fwd decl. to avoid include hell. */
     
    7675        struct as *as;         /**< Current address space. */
    7776        uint32_t magic;        /**< Magic value */
    78 } the_t;
     77} current_t;
    7978
    8079typedef struct {
     
    9695#define ARCH_OP(op)     ARCH_STRUCT_OP(arch_ops, op)
    9796
    98 extern void the_initialize(the_t *);
    99 extern void the_copy(the_t *, the_t *);
     97extern void current_initialize(current_t *);
     98extern void current_copy(current_t *, current_t *);
    10099
    101100extern void calibrate_delay_loop(void);
Note: See TracChangeset for help on using the changeset viewer.