update ltt-events
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Nov 2010 23:21:50 +0000 (18:21 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Nov 2010 23:21:50 +0000 (18:21 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-events.c

index 96c90c4cc674eb967482d1963f50772e8912ae09..a5499f40de30f9f0c5818a24004243dba845fbdb 100644 (file)
@@ -13,6 +13,14 @@ static LIST_HEAD(sessions);
 static DEFINE_MUTEX(sessions_mutex);
 static struct kmem_cache *event_cache;
 
+static void synchronize_trace(void)
+{
+       synchronize_sched();
+#ifdef CONFIG_PREEMPT_RT
+       synchronize_rcu();
+#endif
+}
+
 struct ltt_session *ltt_session_create(char *name)
 {
        struct ltt_session *session;
@@ -41,6 +49,8 @@ int ltt_session_destroy(struct ltt_session *session)
        struct ltt_event *event, *tmpevent;
 
        mutex_lock(&sessions_mutex);
+       session->active = 0;
+       synchronize_trace();    /* Wait for in-flight events to complete */
        list_for_each_entry_safe(event, tmpevent, &session->events, list)
                _ltt_event_destroy(event);
        list_for_each_entry_safe(chan, tmpchan, &session->chan, list)
@@ -86,6 +96,7 @@ active:
  */
 int _ltt_channel_destroy(struct ltt_channel *chan)
 {
+       /* TODO: destroy rb channel */
        list_del(&chan->list);
        kfree(chan);
 }
This page took 0.02985 seconds and 4 git commands to generate.