Module: xenomai-rpm Branch: for-upstream Commit: fd6c137b512ae2a3915e076edc879742d77b4294 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=fd6c137b512ae2a3915e076edc879742d77b4294
Author: Philippe Gerum <[email protected]> Date: Sun Apr 11 18:23:48 2010 +0200 nucleus: fix relaxing synch owner detector --- ksrc/nucleus/synch.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ksrc/nucleus/synch.c b/ksrc/nucleus/synch.c index 619929e..1cc9b33 100644 --- a/ksrc/nucleus/synch.c +++ b/ksrc/nucleus/synch.c @@ -1000,9 +1000,11 @@ void xnsynch_detect_relaxed_owner(struct xnsynch *synch, struct xnthread *sleepe /* * Detect when a thread is about to relax while holding a - * synchronization object currently claimed by someone else. By - * relying on the claim queue, we restrict the checks to PIP-enabled - * objects, but that already covers most of the use cases anyway. + * synchronization object currently claimed by another thread, which + * bears the TWARNSW bit (thus advertising a concern about potential + * spurious relaxes and priority inversion). By relying on the claim + * queue, we restrict the checks to PIP-enabled objects, but that + * already covers most of the use cases anyway. */ void xnsynch_detect_claimed_relax(struct xnthread *owner) { @@ -1016,7 +1018,7 @@ void xnsynch_detect_claimed_relax(struct xnthread *owner) for (ht = getheadpq(&synch->pendq); ht != NULL; ht = nextpq(&synch->pendq, ht)) { sleeper = link2thread(ht, plink); - if (xnthread_test_state(sleeper, XNRELAX)) { + if (xnthread_test_state(sleeper, XNTRAPSW)) { xnthread_set_state(sleeper, XNSWREP); xnshadow_send_sig(sleeper, SIGDEBUG, SIGDEBUG_MIGRATE_PRIOINV, 1); _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
