* [Xenomai-core] Bug when closing a busy file descriptor.
@ 2007-06-06 15:39 Gilles Chanteperdrix
2007-06-06 15:54 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Gilles Chanteperdrix @ 2007-06-06 15:39 UTC (permalink / raw)
To: Xenomai core
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xeno-unlock-context-when-restarting-rtdm-close.diff --]
[-- Type: text/x-patch; name="xeno-unlock-context-when-restarting-rtdm-close.diff", Size: 683 bytes --]
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] Bug when closing a busy file descriptor.
2007-06-06 15:39 [Xenomai-core] Bug when closing a busy file descriptor Gilles Chanteperdrix
@ 2007-06-06 15:54 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2007-06-06 15:54 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai core
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
Gilles Chanteperdrix wrote:
> 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.
>
Yep. Applied, thanks.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-06 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-06 15:39 [Xenomai-core] Bug when closing a busy file descriptor Gilles Chanteperdrix
2007-06-06 15:54 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.