Changeset 3648ea56 in mainline
- Timestamp:
- 2012-07-30T19:20:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 09737cc
- Parents:
- 452e91b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/rcu.c
r452e91b r3648ea56 164 164 static void start_reclaimers(void); 165 165 static void synch_complete(rcu_item_t *rcu_item); 166 static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item, 167 rcu_func_t func); 166 168 static void add_barrier_cb(void *arg); 167 169 static void barrier_complete(rcu_item_t *barrier_item); … … 565 567 void rcu_call(rcu_item_t *rcu_item, rcu_func_t func) 566 568 { 567 _rcu_call(false, rcu_item, func);569 rcu_call_impl(false, rcu_item, func); 568 570 } 569 571 … … 571 573 void _rcu_call(bool expedite, rcu_item_t *rcu_item, rcu_func_t func) 572 574 { 575 rcu_call_impl(expedite, rcu_item, func); 576 } 577 578 /** rcu_call() inline-able implementation. See rcu_call() for comments. */ 579 static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item, 580 rcu_func_t func) 581 { 573 582 ASSERT(rcu_item); 574 583 … … 580 589 ipl_t ipl = interrupts_disable(); 581 590 582 *CPU->rcu.parriving_cbs_tail = rcu_item; 583 CPU->rcu.parriving_cbs_tail = &rcu_item->next; 584 585 size_t cnt = ++CPU->rcu.arriving_cbs_cnt; 591 rcu_cpu_data_t *r = &CPU->rcu; 592 *r->parriving_cbs_tail = rcu_item; 593 r->parriving_cbs_tail = &rcu_item->next; 594 595 size_t cnt = ++r->arriving_cbs_cnt; 586 596 interrupts_restore(ipl); 587 597 588 598 if (expedite) { 589 CPU->rcu.expedite_arriving = true;599 r->expedite_arriving = true; 590 600 } 591 601 592 602 /* Added first callback - notify the reclaimer. */ 593 if (cnt == 1 && !semaphore_count_get(& CPU->rcu.arrived_flag)) {594 semaphore_up(& CPU->rcu.arrived_flag);603 if (cnt == 1 && !semaphore_count_get(&r->arrived_flag)) { 604 semaphore_up(&r->arrived_flag); 595 605 } 596 606
Note:
See TracChangeset
for help on using the changeset viewer.