From: Michal MalĂ˝ Date: Fri, 25 Jul 2014 19:00:01 +0000 (+0200) Subject: Add some debugging output, this shall be useful quite soon X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=bbe5c661400e032fa5ec96898ef26cc9d65c55fc;p=KLGD.git Add some debugging output, this shall be useful quite soon --- diff --git a/klgd.c b/klgd.c index feb2484..86c9f53 100644 --- a/klgd.c +++ b/klgd.c @@ -131,12 +131,16 @@ void klgd_notify_commands_sent(struct klgd_main *ctx) if (atomic_read(&priv->send_asap)) { unsigned long flags; + pr_debug("Command stream processed, send a new one immediately\n"); + spin_lock_irqsave(&priv->stream_lock, flags); klgd_build_command_stream(ctx); spin_unlock_irqrestore(&priv->stream_lock, flags); atomic_set(&priv->send_asap, 0); - } else + } else { + pr_debug("Command stream processed, wait for timer\n"); atomic_set(&priv->can_send_commands, 1); + } } int klgd_post_event(struct klgd_main *ctx, size_t idx, void *data) @@ -208,11 +212,15 @@ void klgd_timer_fired(unsigned long ctx) if (atomic_read(&priv->can_send_commands)) { unsigned long flags; + pr_debug("Timer fired, can send commands now\n"); + spin_lock_irqsave(&priv->stream_lock, flags); klgd_build_command_stream(m); spin_unlock_irqrestore(&priv->stream_lock, flags); - } else + } else { + pr_debug("Timer fired, last stream of commands is still being processed\n"); atomic_set(&priv->send_asap, 1); + } klgd_schedule_update(ctx); } \ No newline at end of file