Changeset a35b458 in mainline for kernel/generic/src/smp/smp_call.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/smp/smp_call.c

    r3061bc1 ra35b458  
    5555        assert(CPU);
    5656        assert(PREEMPTION_DISABLED || interrupts_disabled());
    57        
     57
    5858        spinlock_initialize(&CPU->smp_calls_lock, "cpu[].smp_calls_lock");
    5959        list_initialize(&CPU->smp_pending_calls);
     
    133133        assert(!interrupts_disabled());
    134134        assert(call_info != NULL);
    135        
     135
    136136        /* Discard invalid calls. */
    137137        if (config.cpu_count <= cpu_id || !cpus[cpu_id].active) {
     
    140140                return;
    141141        }
    142        
     142
    143143        /* Protect cpu->id against migration. */
    144144        preemption_disable();
    145145
    146146        call_start(call_info, func, arg);
    147        
     147
    148148        if (cpu_id != CPU->id) {
    149149#ifdef CONFIG_SMP
     
    169169                func(arg);
    170170                interrupts_restore(ipl);
    171                
     171
    172172                call_done(call_info);
    173173        }
    174        
     174
    175175        preemption_enable();
    176176}
     
    209209        assert(interrupts_disabled());
    210210        assert(CPU);
    211        
     211
    212212        list_t calls_list;
    213213        list_initialize(&calls_list);
    214        
     214
    215215        /*
    216216         * Acts as a load memory barrier. Any changes made by the cpu that
     
    224224        for (link_t *cur = calls_list.head.next, *next = cur->next;
    225225                !list_empty(&calls_list); cur = next, next = cur->next) {
    226                
     226
    227227                smp_call_t *call_info = list_get_instance(cur, smp_call_t, calls_link);
    228228                list_remove(cur);
    229                
     229
    230230                call_info->func(call_info->arg);
    231231                call_done(call_info);
     
    240240        call_info->func = func;
    241241        call_info->arg = arg;
    242        
     242
    243243        /*
    244244         * We can't use standard spinlocks here because we want to lock
     
    247247         */
    248248        atomic_set(&call_info->pending, 1);
    249        
     249
    250250        /* Let initialization complete before continuing. */
    251251        memory_barrier();
Note: See TracChangeset for help on using the changeset viewer.