--- task.c      2006-05-19 18:25:19.000000000 +0200
+++ task-my.c   2006-07-12 15:40:16.549170000 +0200
@@ -426,7 +426,8 @@ int rt_task_suspend(RT_TASK *task)
         goto unlock_and_exit;
     }
                                                                                                                                            
-    if (xnpod_unblockable_p()) {
+    /* we are about to suspend a task, let's check wehther it may sleep */
+    if (xnthread_test_flags(task, XNLOCK|XNROOT)) {
         err = -EPERM;
         goto unlock_and_exit;
     }
                                                                                                                                            

See the difference? :) it was slightly broken indeed, meaning it just bailed out all the calls from the interrupt context which is wrong according to spec.

maybe something like xnthread_task_unblockable/blockable(task)  would be also of avail.


Oh, my dear. I should stop hacking patches while talking to colleagues.
Does this one make more sense?

maybe it's better that the other way around? I mean, writting good code and saying nonsense to your collegues... :o>


--
Best regards,
Dmitry Adamushko

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to