All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH 2/2] Fix abs. timeout restart in xnsynch_sleep_on
Date: Sun, 03 Jun 2007 11:24:25 +0200	[thread overview]
Message-ID: <466288C9.7030907@domain.hid> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 0 bytes --]



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: fix-sleep-on-timeout.patch --]
[-- Type: text/x-patch; name="fix-sleep-on-timeout.patch", Size: 1131 bytes --]

---
 ChangeLog            |    3 +++
 ksrc/nucleus/synch.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Index: xenomai/ksrc/nucleus/synch.c
===================================================================
--- xenomai.orig/ksrc/nucleus/synch.c
+++ 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. */
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ 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  <rpm@xenomai.org>
 
 	* ksrc/skins/psos+, src/skins/psos+, include/psos+/psos.h: Add

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

                 reply	other threads:[~2007-06-03  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=466288C9.7030907@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.