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


Ignore:
Timestamp:
2018-11-01T14:30:03Z (6 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/preemption.h

    rbab75df6 ra6e55886  
    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.