Hi,

there is a bug when closing a busy file descriptor: the close function
keeps incrementing the file descriptor reference count making it
impossible to really close the file descriptor. 

The attached patch fixes this.

-- 
                                                 Gilles Chanteperdrix
Index: ksrc/skins/rtdm/core.c
===================================================================
--- ksrc/skins/rtdm/core.c	(révision 2533)
+++ ksrc/skins/rtdm/core.c	(copie de travail)
@@ -340,6 +340,7 @@
     XENO_ASSERT(RTDM, !rthal_local_irq_test(), rthal_local_irq_enable(););
 
     if (unlikely(ret == -EAGAIN) && !rtdm_in_rt_context()) {
+	rtdm_context_unlock(context);
         msleep(CLOSURE_RETRY_PERIOD);
         goto again;
     } else if (unlikely(ret < 0))
@@ -354,6 +355,7 @@
             ret = -EAGAIN;
             goto unlock_out;
         }
+	rtdm_context_unlock(context);
         msleep(CLOSURE_RETRY_PERIOD);
         goto again;
     }
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to