Skip to contentSkip to conversation

Fix abs. timeout restart in xnsynch_sleep_on

PATCH New Jan Kiszka 1 participant 1 message Jun 3, 2007

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 2/2 Fix abs. timeout restart in xnsynch_sleep_on

---
 ChangeLog            |    3 +++
 ksrc/nucleus/synch.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
ksrc/nucleus/synch.c +1 -1
Index: xenomai/ksrc/nucleus/synch.c
===================================================================
@@ -228,7 +228,7 @@ redo:
 		/* Somebody stole us the ownership while we were ready
 		   to run, waiting for the CPU: we need to wait again
 		   for the resource. */
-		if (timeout == XN_INFINITE)
+		if (mode == XN_ABSOLUTE || timeout == XN_INFINITE)
 			goto redo;
 		timeout = xnthread_timeout(thread);
 		if (timeout > 1) /* Otherwise, it's too late. */
ChangeLog +3 -0
Index: xenomai/ChangeLog
===================================================================
@@ -6,6 +6,9 @@
 	* ksrc/nucleus/{module.c, shadow.c}: Move remove_proc_entry out of
 	nklock.
 
+	* ksrc/nucleus/synch.c (xnsynch_sleep_on): Fix timeout restart
+	if resource was robbed.
+
 2007-06-02  Philippe Gerum  <[email protected]>
 
 	* ksrc/skins/psos+, src/skins/psos+, include/psos+/psos.h: Add