-static void trace_async_wakeup(struct ltt_trace *trace)
-{
- int i;
- struct ltt_chan *chan;
-
- /* Must check each channel for pending read wakeup */
- for (i = 0; i < trace->nr_channels; i++) {
- chan = &trace->channels[i];
- if (chan->active)
- trace->ops->wakeup_channel(chan);
- }
-}
-
-/* Timer to send async wakeups to the readers */
-static void async_wakeup(unsigned long data)
-{
- struct ltt_trace *trace;
-
- /*
- * PREEMPT_RT does not allow spinlocks to be taken within preempt
- * disable sections (spinlock taken in wake_up). However, mainline won't
- * allow mutex to be taken in interrupt context. Ugly.
- * Take a standard RCU read lock for RT kernels, which imply that we
- * also have to synchronize_rcu() upon updates.
- */
-#ifndef CONFIG_PREEMPT_RT
- rcu_read_lock_sched();
-#else
- rcu_read_lock();
-#endif
- list_for_each_entry_rcu(trace, <t_traces.head, list) {
- trace_async_wakeup(trace);
- }
-#ifndef CONFIG_PREEMPT_RT
- rcu_read_unlock_sched();
-#else
- rcu_read_unlock();
-#endif
-
- mod_timer(<t_async_wakeup_timer, jiffies + LTT_PERCPU_TIMER_INTERVAL);
-}
-