Changeset a6e55886 in mainline for kernel/generic/include/arch.h


Ignore:
Timestamp:
2018-11-01T14:30:03Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d1da1ff2
Parents:
bab75df6
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-01 14:30:03)
git-committer:
GitHub <noreply@…> (2018-11-01 14:30:03)
Message:

Rename THE/the_t to CURRENT/current_t (#50)

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

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

File:
1 edited

Legend:

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

    rbab75df6 ra6e55886  
    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 current_t structure holds pointers to various parts of the current
     43 * execution state, like running task, thread, address space, etc.
    4644 */
    47 #define THE  ((the_t * )(get_stack_base()))
     45#define CURRENT  ((current_t * )(get_stack_base()))
    4846
    4947#define MAGIC                UINT32_C(0xfacefeed)
     
    5351#define DEFAULT_CONTAINER  0
    5452#define CONTAINER \
    55         ((THE->task) ? (THE->task->container) : (DEFAULT_CONTAINER))
     53        ((CURRENT->task) ? (CURRENT->task->container) : (DEFAULT_CONTAINER))
    5654
    5755/* Fwd decl. to avoid include hell. */
     
    7674        struct as *as;         /**< Current address space. */
    7775        uint32_t magic;        /**< Magic value */
    78 } the_t;
     76} current_t;
    7977
    8078typedef struct {
     
    9694#define ARCH_OP(op)     ARCH_STRUCT_OP(arch_ops, op)
    9795
    98 extern void the_initialize(the_t *);
    99 extern void the_copy(the_t *, the_t *);
     96extern void current_initialize(current_t *);
     97extern void current_copy(current_t *, current_t *);
    10098
    10199extern void calibrate_delay_loop(void);
Note: See TracChangeset for help on using the changeset viewer.