Changeset d4d36f9 in mainline for kernel/generic/include/synch/rcu.h


Ignore:
Timestamp:
2012-07-30T05:23:06Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
452e91b
Parents:
f0fcb04
Message:

rcu: Added another preemptible kernel rcu - A-RCU.

File:
1 edited

Legend:

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

    rf0fcb04 rd4d36f9  
    123123extern void _rcu_synchronize(bool expedite);
    124124
     125
     126#ifdef RCU_PREEMPT_A
     127
     128#define RCU_CNT_INC       (1 << 1)
     129#define RCU_WAS_PREEMPTED (1 << 0)
     130
     131/* Fwd. decl. because of inlining. */
     132void _rcu_preempted_unlock(void);
     133
     134/** Delimits the start of an RCU reader critical section.
     135 *
     136 * Reader sections may be nested and are preemptable. You must not
     137 * however block/sleep within reader sections.
     138 */
     139static inline void rcu_read_lock(void)
     140{
     141        THE->rcu_nesting += RCU_CNT_INC;
     142}
     143
     144/** Delimits the end of an RCU reader critical section. */
     145static inline void rcu_read_unlock(void)
     146{
     147        THE->rcu_nesting -= RCU_CNT_INC;
     148       
     149        if (RCU_WAS_PREEMPTED == THE->rcu_nesting) {
     150                _rcu_preempted_unlock();
     151        }
     152}
     153
     154#elif defined(RCU_PREEMPT_PODZIMEK)
    125155
    126156/* Fwd decl. required by the inlined implementation. Not part of public API. */
     
    210240        preemption_enable();
    211241}
    212 
    213 
    214242#endif
    215243
     244#endif
     245
    216246/** @}
    217247 */
Note: See TracChangeset for help on using the changeset viewer.