Changeset 4a6da62 in mainline
- Timestamp:
- 2012-07-24T14:20:54Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64be561
- Parents:
- 5b382774
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/rcu.h
r5b382774 r4a6da62 147 147 148 148 149 #ifndef member_to_inst150 #define member_to_inst(ptr_member, type, member_identif) \151 ((type*) (((void*)(ptr_member)) - ((void*)&(((type*)0)->member_identif))))152 #endif153 154 149 /** Use to assign a pointer to newly initialized data to a rcu reader 155 150 * accessible pointer. … … 205 200 extern void rcu_read_lock(void); 206 201 extern void rcu_read_unlock(void); 202 extern bool rcu_read_locked(void); 207 203 extern void rcu_synchronize(void); 208 204 extern void rcu_call(rcu_item_t *rcu_item, rcu_func_t func); -
kernel/generic/src/synch/rcu.c
r5b382774 r4a6da62 386 386 387 387 preemption_enable(); 388 } 389 390 /** Returns true if in an rcu reader section. */ 391 bool rcu_read_locked(void) 392 { 393 preemption_disable(); 394 bool locked = 0 < *CPU->rcu.pnesting_cnt; 395 preemption_enable(); 396 397 return locked; 388 398 } 389 399
Note:
See TracChangeset
for help on using the changeset viewer.