Module: xenomai-gch
Branch: for-forge
Commit: c94b1acfbaa7a0bb3fc22ef31e04ddf21bfa6654
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=c94b1acfbaa7a0bb3fc22ef31e04ddf21bfa6654

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue Oct 13 21:05:53 2015 +0200

rtdm/schedule_work: avoid ipipe_work_post_root

if called from root domain.

---

 kernel/cobalt/rtdm/drvlib.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c
index 0ea344d..481ad83 100644
--- a/kernel/cobalt/rtdm/drvlib.c
+++ b/kernel/cobalt/rtdm/drvlib.c
@@ -1518,14 +1518,18 @@ static void lostage_schedule_work(struct 
ipipe_work_header *work)
  */
 void rtdm_schedule_nrt_work(struct work_struct *lostage_work)
 {
-       struct lostage_schedule_work macb_work = {
+       struct lostage_schedule_work ipipe_work = {
                .work = {
-                       .size = sizeof(macb_work),
+                       .size = sizeof(ipipe_work),
                        .handler = lostage_schedule_work,
                },
                .lostage_work = lostage_work,
        };
-       ipipe_post_work_root(&macb_work, work);
+
+       if (ipipe_root_p)
+               schedule_work(lostage_work);
+       else
+               ipipe_post_work_root(&ipipe_work, work);
 }
 EXPORT_SYMBOL_GPL(rtdm_schedule_nrt_work);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to