From 60fcf18e5f9de5508f4ce4bdceb845c97b4362f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Wed, 13 Aug 2014 11:54:56 +0200 Subject: [PATCH] Allow plugins state unlocking without rescheduling --- klgd.c | 10 +++++++++- klgd.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/klgd.c b/klgd.c index da11a7a..44f2328 100644 --- a/klgd.c +++ b/klgd.c @@ -302,13 +302,21 @@ int klgd_register_plugin(struct klgd_main *ctx, size_t idx, struct klgd_plugin * } EXPORT_SYMBOL_GPL(klgd_register_plugin); +void klgd_unlock_plugins(struct mutex *lock) +{ + mutex_unlock(lock); + printk(KERN_DEBUG "KLGD: Plugins state unlocked, NOT scheduled\n"); +} +EXPORT_SYMBOL_GPL(klgd_unlock_plugins); + + void klgd_unlock_plugins_sched(struct mutex *lock) { struct klgd_main_private *priv = container_of(lock, struct klgd_main_private, plugins_lock); klgd_schedule_update(priv); mutex_unlock(lock); - printk(KERN_DEBUG "KLGD: Plugins state unlocked\n"); + printk(KERN_DEBUG "KLGD: Plugins state unlocked, rescheduled\n"); } EXPORT_SYMBOL_GPL(klgd_unlock_plugins_sched); diff --git a/klgd.h b/klgd.h index 0bcd8d8..588b289 100644 --- a/klgd.h +++ b/klgd.h @@ -37,4 +37,5 @@ int klgd_init(struct klgd_main *ctx, void *dev_ctx, enum klgd_send_status (*call void klgd_lock_plugins(struct mutex *lock); void klgd_notify_commands_sent(struct klgd_main *ctx); int klgd_register_plugin(struct klgd_main *ctx, const size_t idx, struct klgd_plugin *plugin); +void klgd_unlock_plugins(struct mutex *lock); void klgd_unlock_plugins_sched(struct mutex *lock); -- 2.43.5