Changeset 1b20da0 in mainline for kernel/generic/include/synch


Ignore:
Timestamp:
2018-02-28T17:52:03Z (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:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

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

Legend:

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

    rdf6ded8 r1b20da0  
    4141
    4242
    43 /** Use to assign a pointer to newly initialized data to a rcu reader 
     43/** Use to assign a pointer to newly initialized data to a rcu reader
    4444 * accessible pointer.
    45  * 
     45 *
    4646 * Example:
    4747 * @code
     
    5050 *     int grade;
    5151 * } exam_t;
    52  * 
     52 *
    5353 * exam_t *exam_list;
    5454 * // ..
    55  * 
     55 *
    5656 * // Insert at the beginning of the list.
    5757 * exam_t *my_exam = malloc(sizeof(exam_t), 0);
     
    5959 * my_exam->next = exam_list;
    6060 * rcu_assign(exam_list, my_exam);
    61  * 
     61 *
    6262 * // Changes properly propagate. Every reader either sees
    6363 * // the old version of exam_list or the new version with
     
    6565 * rcu_synchronize();
    6666 * // Now we can be sure every reader sees my_exam.
    67  * 
     67 *
    6868 * @endcode
    6969 */
     
    7575
    7676/** Use to access RCU protected data in a reader section.
    77  * 
     77 *
    7878 * Example:
    7979 * @code
    8080 * exam_t *exam_list;
    8181 * // ...
    82  * 
     82 *
    8383 * rcu_read_lock();
    8484 * exam_t *first_exam = rcu_access(exam_list);
    85  * // We can now safely use first_exam, it won't change 
     85 * // We can now safely use first_exam, it won't change
    8686 * // under us while we're using it.
    8787 *
     
    131131void _rcu_preempted_unlock(void);
    132132
    133 /** Delimits the start of an RCU reader critical section. 
    134  * 
     133/** Delimits the start of an RCU reader critical section.
     134 *
    135135 * Reader sections may be nested and are preemptible. You must not
    136136 * however block/sleep within reader sections.
     
    165165        assert(PREEMPTION_DISABLED || interrupts_disabled());
    166166       
    167         /* 
    168          * A new GP was started since the last time we passed a QS. 
     167        /*
     168         * A new GP was started since the last time we passed a QS.
    169169         * Notify the detector we have reached a new QS.
    170170         */
    171171        if (CPU->rcu.last_seen_gp != _rcu_cur_gp) {
    172172                rcu_gp_t cur_gp = ACCESS_ONCE(_rcu_cur_gp);
    173                 /* 
    174                  * Contain memory accesses within a reader critical section. 
     173                /*
     174                 * Contain memory accesses within a reader critical section.
    175175                 * If we are in rcu_lock() it also makes changes prior to the
    176176                 * start of the GP visible in the reader section.
     
    180180                 * Acknowledge we passed a QS since the beginning of rcu.cur_gp.
    181181                 * Cache coherency will lazily transport the value to the
    182                  * detector while it sleeps in gp_sleep(). 
    183                  * 
     182                 * detector while it sleeps in gp_sleep().
     183                 *
    184184                 * Note that there is a theoretical possibility that we
    185                  * overwrite a more recent/greater last_seen_gp here with 
     185                 * overwrite a more recent/greater last_seen_gp here with
    186186                 * an older/smaller value. If this cpu is interrupted here
    187                  * while in rcu_lock() reader sections in the interrupt handler 
    188                  * will update last_seen_gp to the same value as is currently 
    189                  * in local cur_gp. However, if the cpu continues processing 
    190                  * interrupts and the detector starts a new GP immediately, 
    191                  * local interrupt handlers may update last_seen_gp again (ie 
    192                  * properly ack the new GP) with a value greater than local cur_gp. 
    193                  * Resetting last_seen_gp to a previous value here is however 
    194                  * benign and we only have to remember that this reader may end up 
     187                 * while in rcu_lock() reader sections in the interrupt handler
     188                 * will update last_seen_gp to the same value as is currently
     189                 * in local cur_gp. However, if the cpu continues processing
     190                 * interrupts and the detector starts a new GP immediately,
     191                 * local interrupt handlers may update last_seen_gp again (ie
     192                 * properly ack the new GP) with a value greater than local cur_gp.
     193                 * Resetting last_seen_gp to a previous value here is however
     194                 * benign and we only have to remember that this reader may end up
    195195                 * in cur_preempted even after the GP ends. That is why we
    196                  * append next_preempted to cur_preempted rather than overwriting 
     196                 * append next_preempted to cur_preempted rather than overwriting
    197197                 * it as if cur_preempted were empty.
    198198                 */
     
    201201}
    202202
    203 /** Delimits the start of an RCU reader critical section. 
    204  * 
     203/** Delimits the start of an RCU reader critical section.
     204 *
    205205 * Reader sections may be nested and are preemptable. You must not
    206206 * however block/sleep within reader sections.
     
    229229                _rcu_record_qs();
    230230               
    231                 /* 
    232                  * The thread was preempted while in a critical section or 
    233                  * the detector is eagerly waiting for this cpu's reader to finish. 
     231                /*
     232                 * The thread was preempted while in a critical section or
     233                 * the detector is eagerly waiting for this cpu's reader to finish.
    234234                 */
    235235                if (CPU->rcu.signal_unlock) {
  • kernel/generic/include/synch/rcu_types.h

    rdf6ded8 r1b20da0  
    7272       
    7373        /** True if we should signal the detector that we exited a reader section.
    74          * 
     74         *
    7575         * Equal to (THREAD->rcu.was_preempted || CPU->rcu.is_delaying_gp).
    7676         */
    7777        bool signal_unlock;
    7878
    79         /** The number of times an RCU reader section is nested on this cpu. 
    80          * 
    81          * If positive, it is definitely executing reader code. If zero, 
     79        /** The number of times an RCU reader section is nested on this cpu.
     80         *
     81         * If positive, it is definitely executing reader code. If zero,
    8282         * the thread might already be executing reader code thanks to
    8383         * cpu instruction reordering.
     
    9292        /** Number of callbacks in cur_cbs. */
    9393        size_t cur_cbs_cnt;
    94         /** Callbacks to invoke once the next grace period ends, ie next_cbs_gp. 
     94        /** Callbacks to invoke once the next grace period ends, ie next_cbs_gp.
    9595         * Accessed by the local reclaimer only.
    9696         */
     
    102102        /** Tail of arriving_cbs list. Disable interrupts to access. */
    103103        rcu_item_t **parriving_cbs_tail;
    104         /** Number of callbacks currently in arriving_cbs. 
     104        /** Number of callbacks currently in arriving_cbs.
    105105         * Disable interrupts to access.
    106106         */
     
    110110        rcu_gp_t cur_cbs_gp;
    111111        /** At the end of this grace period callbacks in next_cbs will be invoked.
    112          * 
    113          * Should be the next grace period but it allows the reclaimer to 
     112         *
     113         * Should be the next grace period but it allows the reclaimer to
    114114         * notice if it missed a grace period end announcement. In that
    115115         * case it can execute next_cbs without waiting for another GP.
    116          * 
     116         *
    117117         * Invariant: next_cbs_gp >= cur_cbs_gp
    118118         */
     
    143143/** RCU related per-thread data. */
    144144typedef struct rcu_thread_data {
    145         /** 
    146          * Nesting count of the thread's RCU read sections when the thread 
     145        /**
     146         * Nesting count of the thread's RCU read sections when the thread
    147147         * is not running.
    148148         */
     
    151151#ifdef RCU_PREEMPT_PODZIMEK
    152152       
    153         /** True if the thread was preempted in a reader section. 
     153        /** True if the thread was preempted in a reader section.
    154154         *
    155155         * The thread is placed into rcu.cur_preempted or rcu.next_preempted
    156          * and must remove itself in rcu_read_unlock(). 
    157          * 
     156         * and must remove itself in rcu_read_unlock().
     157         *
    158158         * Access with interrupts disabled.
    159159         */
  • kernel/generic/include/synch/workqueue.h

    rdf6ded8 r1b20da0  
    5353        /* Magic number for integrity checks. */
    5454        uint32_t cookie;
    55 #endif 
     55#endif
    5656} work_t;
    5757
Note: See TracChangeset for help on using the changeset viewer.