Changeset 91a8f83 in mainline for kernel/generic/src/synch/rcu.c


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/src/synch/rcu.c

    r482f968 r91a8f83  
    10261026        cpu_mask_t *reader_cpus = (cpu_mask_t *)arg;
    10271027
    1028         bool locked = RCU_CNT_INC <= THE->rcu_nesting;
     1028        bool locked = RCU_CNT_INC <= CURRENT->rcu_nesting;
    10291029        /* smp_call machinery makes the most current _rcu_cur_gp visible. */
    10301030        bool passed_qs = (CPU->rcu.last_seen_gp == _rcu_cur_gp);
     
    10541054         * with a local copy.
    10551055         */
    1056         size_t nesting_cnt = local_atomic_exchange(&THE->rcu_nesting, 0);
     1056        size_t nesting_cnt = local_atomic_exchange(&CURRENT->rcu_nesting, 0);
    10571057
    10581058        /*
     
    11131113
    11141114        /* Load the thread's saved nesting count from before it was preempted. */
    1115         THE->rcu_nesting = THREAD->rcu.nesting_cnt;
     1115        CURRENT->rcu_nesting = THREAD->rcu.nesting_cnt;
    11161116}
    11171117
     
    11231123void rcu_thread_exiting(void)
    11241124{
    1125         assert(THE->rcu_nesting == 0);
     1125        assert(CURRENT->rcu_nesting == 0);
    11261126
    11271127        /*
     
    11451145bool rcu_read_locked(void)
    11461146{
    1147         return RCU_CNT_INC <= THE->rcu_nesting;
     1147        return RCU_CNT_INC <= CURRENT->rcu_nesting;
    11481148}
    11491149
     
    11511151void _rcu_preempted_unlock(void)
    11521152{
    1153         assert(0 == THE->rcu_nesting || RCU_WAS_PREEMPTED == THE->rcu_nesting);
    1154 
    1155         size_t prev = local_atomic_exchange(&THE->rcu_nesting, 0);
     1153        assert(0 == CURRENT->rcu_nesting || RCU_WAS_PREEMPTED == CURRENT->rcu_nesting);
     1154
     1155        size_t prev = local_atomic_exchange(&CURRENT->rcu_nesting, 0);
    11561156        if (prev == RCU_WAS_PREEMPTED) {
    11571157                /*
Note: See TracChangeset for help on using the changeset viewer.