Changeset 91a8f83 in mainline for kernel/generic/include/preemption.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/preemption.h

    r482f968 r91a8f83  
    4141
    4242#define PREEMPTION_INC         (1 << 0)
    43 #define PREEMPTION_DISABLED    (PREEMPTION_INC <= THE->preemption)
     43#define PREEMPTION_DISABLED    (PREEMPTION_INC <= CURRENT->preemption)
    4444#define PREEMPTION_ENABLED     (!PREEMPTION_DISABLED)
    4545
     
    4747#define preemption_disable() \
    4848        do { \
    49                 THE->preemption += PREEMPTION_INC; \
     49                CURRENT->preemption += PREEMPTION_INC; \
    5050                compiler_barrier(); \
    5151        } while (0)
     
    5656                assert(PREEMPTION_DISABLED); \
    5757                compiler_barrier(); \
    58                 THE->preemption -= PREEMPTION_INC; \
     58                CURRENT->preemption -= PREEMPTION_INC; \
    5959        } while (0)
    6060
Note: See TracChangeset for help on using the changeset viewer.