cobalt/registry: replace calling __xnapc_schedule with irq_work_queue to schedule registry_proc_work
Quoted 50 lines · On 25.09.20 09:03, hongzha1 wrote:
call
irq_work_queueto scheduleregistry_proc_workinstead of calling__xnapc_scheduleSigned-off-by hongzha1 <[email protected]>---
this patch is for wip/dovetailkernel/cobalt/registry.c +13
-1@@ -21,8 +21,8 @@#include <cobalt/kernel/heap.h> #include <cobalt/kernel/registry.h> #include <cobalt/kernel/thread.h> -#include <cobalt/kernel/apc.h> #include <cobalt/kernel/assert.h> +#include <linux/irq_work.h> /** * @ingroup cobalt_core @@ -338,6 +338,17 @@ static void registry_proc_schedule(void *cookie)schedule_work (®istry_proc_work); } +static void do_xnregistry_work (struct irq_work *work) +{ +/* +* schedule_work() will check for us if the work has already +* been scheduled, so just be lazy and submit blindly. +*/ +schedule_work (®istry_proc_work); + +} +static DEFINE_IRQ_WORK(xnregistry_irq_work, do_xnregistry_work); +static int registry_export_vfsnap (struct xnobject *object,struct xnpnode *pnode) {@@ -472,6 +483,7 @@ static inline void registry_export_pnode(struct xnobject *object,list_add_tail (&object->link, &proc_object_list);#warning TODO: irq_work//__xnapc_schedule(proc_apc); +irq_work_queue (&xnregistry_irq_work); }static inline void registry_unexport_pnode (struct xnobject *object)
kernel/cobalt/registry.c static inline void registry_unexport_pnode(struct xnobject *object) · line 507
Quoted 7 lines
kernel/cobalt/registry.c +1
-0@@ -489,6 +501,7 @@ static inline void registry_unexport_pnode(struct xnobject *object)list_add_tail (&object->link, &proc_object_list);#warning TODO: irq_work//__xnapc_schedule(proc_apc); +irq_work_queue (&xnregistry_irq_work); }else {/* * Unexporting before the lower stage has had a chance
This looks straightforward. Merged.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux