Changeset 8565a42 in mainline for kernel/generic/src/time/timeout.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/time/timeout.c

    r3061bc1 r8565a42  
    103103        irq_spinlock_lock(&CPU->timeoutlock, true);
    104104        irq_spinlock_lock(&timeout->lock, false);
    105        
     105
    106106        if (timeout->cpu)
    107107                panic("Unexpected: timeout->cpu != 0.");
    108        
     108
    109109        timeout->cpu = CPU;
    110110        timeout->ticks = us2ticks(time);
    111        
     111
    112112        timeout->handler = handler;
    113113        timeout->arg = arg;
    114        
     114
    115115        /*
    116116         * Insert timeout into the active timeouts list according to timeout->ticks.
     
    123123                target = list_get_instance(cur, timeout_t, link);
    124124                irq_spinlock_lock(&target->lock, false);
    125                
     125
    126126                if (timeout->ticks < sum + target->ticks) {
    127127                        irq_spinlock_unlock(&target->lock, false);
    128128                        break;
    129129                }
    130                
     130
    131131                sum += target->ticks;
    132132                irq_spinlock_unlock(&target->lock, false);
    133133        }
    134        
     134
    135135        /* Avoid using cur->prev directly */
    136136        link_t *prev = cur->prev;
    137137        list_insert_after(&timeout->link, prev);
    138        
     138
    139139        /*
    140140         * Adjust timeout->ticks according to ticks
     
    142142         */
    143143        timeout->ticks -= sum;
    144        
     144
    145145        /*
    146146         * Decrease ticks of timeout's immediate succesor by timeout->ticks.
     
    151151                irq_spinlock_unlock(&target->lock, false);
    152152        }
    153        
     153
    154154        irq_spinlock_unlock(&timeout->lock, false);
    155155        irq_spinlock_unlock(&CPU->timeoutlock, true);
     
    168168{
    169169        DEADLOCK_PROBE_INIT(p_tolock);
    170        
     170
    171171grab_locks:
    172172        irq_spinlock_lock(&timeout->lock, true);
     
    175175                return false;
    176176        }
    177        
     177
    178178        if (!irq_spinlock_trylock(&timeout->cpu->timeoutlock)) {
    179179                irq_spinlock_unlock(&timeout->lock, true);
     
    181181                goto grab_locks;
    182182        }
    183        
     183
    184184        /*
    185185         * Now we know for sure that timeout hasn't been activated yet
    186186         * and is lurking in timeout->cpu->timeout_active_list.
    187187         */
    188        
     188
    189189        link_t *cur = timeout->link.next;
    190190        if (cur != &timeout->cpu->timeout_active_list.head) {
     
    194194                irq_spinlock_unlock(&tmp->lock, false);
    195195        }
    196        
     196
    197197        list_remove(&timeout->link);
    198198        irq_spinlock_unlock(&timeout->cpu->timeoutlock, false);
    199        
     199
    200200        timeout_reinitialize(timeout);
    201201        irq_spinlock_unlock(&timeout->lock, true);
    202        
     202
    203203        return true;
    204204}
Note: See TracChangeset for help on using the changeset viewer.