Module: xenomai-3 Branch: next Commit: 2fecd644899cadcbe9f79ab036733211479bf52f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2fecd644899cadcbe9f79ab036733211479bf52f
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Tue Oct 13 21:05:53 2015 +0200 cobalt/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