Changeset a35b458 in mainline for kernel/generic/include/synch


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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.

Location:
kernel/generic/include/synch
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/rcu.h

    r3061bc1 ra35b458  
    147147        compiler_barrier();
    148148        THE->rcu_nesting -= RCU_CNT_INC;
    149        
     149
    150150        if (RCU_WAS_PREEMPTED == THE->rcu_nesting) {
    151151                _rcu_preempted_unlock();
     
    164164{
    165165        assert(PREEMPTION_DISABLED || interrupts_disabled());
    166        
     166
    167167        /*
    168168         * A new GP was started since the last time we passed a QS.
     
    225225        assert(CPU);
    226226        preemption_disable();
    227        
     227
    228228        if (0 == --CPU->rcu.nesting_cnt) {
    229229                _rcu_record_qs();
    230                
     230
    231231                /*
    232232                 * The thread was preempted while in a critical section or
     
    238238                }
    239239        }
    240        
     240
    241241        preemption_enable();
    242242}
  • kernel/generic/include/synch/rcu_types.h

    r3061bc1 ra35b458  
    7070         */
    7171        bool is_delaying_gp;
    72        
     72
    7373        /** True if we should signal the detector that we exited a reader section.
    7474         *
     
    8585        size_t nesting_cnt;
    8686#endif
    87        
     87
    8888        /** Callbacks to invoke once the current grace period ends, ie cur_cbs_gp.
    8989         * Accessed by the local reclaimer only.
     
    118118         */
    119119        rcu_gp_t next_cbs_gp;
    120        
     120
    121121        /** Positive if there are callbacks pending in arriving_cbs. */
    122122        semaphore_t arrived_flag;
    123        
     123
    124124        /** The reclaimer should expedite GPs for cbs in arriving_cbs. */
    125125        bool expedite_arriving;
    126        
     126
    127127        /** Protected by global rcu.barrier_mtx. */
    128128        rcu_item_t barrier_item;
    129        
     129
    130130        /** Interruptable attached reclaimer thread. */
    131131        struct thread *reclaimer_thr;
    132        
     132
    133133        /* Some statistics. */
    134134        size_t stat_max_cbs;
     
    150150
    151151#ifdef RCU_PREEMPT_PODZIMEK
    152        
     152
    153153        /** True if the thread was preempted in a reader section.
    154154         *
     
    160160        bool was_preempted;
    161161#endif
    162        
     162
    163163        /** Preempted threads link. Access with rcu.prempt_lock.*/
    164164        link_t preempt_link;
  • kernel/generic/include/synch/spinlock.h

    r3061bc1 ra35b458  
    4747typedef struct spinlock {
    4848        atomic_t val;
    49        
     49
    5050#ifdef CONFIG_DEBUG_SPINLOCK
    5151        const char *name;
     
    130130         */
    131131        CS_LEAVE_BARRIER();
    132        
     132
    133133        atomic_set(&lock->val, 0);
    134134        preemption_enable();
  • kernel/generic/include/synch/waitq.h

    r3061bc1 ra35b458  
    5555         */
    5656        IRQ_SPINLOCK_DECLARE(lock);
    57        
     57
    5858        /**
    5959         * Number of waitq_wakeup() calls that didn't find a thread to wake up.
     
    6161         */
    6262        int missed_wakeups;
    63        
     63
    6464        /** List of sleeping threads for which there was no missed_wakeup. */
    6565        list_t sleepers;
  • kernel/generic/include/synch/workqueue.h

    r3061bc1 ra35b458  
    4949        link_t queue_link;
    5050        work_func_t func;
    51        
     51
    5252#ifdef CONFIG_DEBUG
    5353        /* Magic number for integrity checks. */
Note: See TracChangeset for help on using the changeset viewer.