LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@ozlabs.org>
To: <cbe-oss-dev@ozlabs.org>, <linuxppc-dev@ozlabs.org>
Subject: [PATCH 2/4] spufs: Minor cleanup of spu_wait
Date: Fri, 13 Apr 2007 11:48:59 +1000	[thread overview]
Message-ID: <1176428939.306624.199053139724.qpush@pokey> (raw)

Change the loop in spu_wait to be a little more straightforward.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

 arch/powerpc/platforms/cell/spufs/spufs.h |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/spufs.h
===================================================================
--- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/spufs.h
+++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -218,14 +218,13 @@ extern char *isolated_loader;
 		prepare_to_wait(&(wq), &__wait, TASK_INTERRUPTIBLE);	\
 		if (condition)						\
 			break;						\
-		if (!signal_pending(current)) {				\
-			spu_release(ctx);				\
-			schedule();					\
-			spu_acquire(ctx);				\
-			continue;					\
+		if (signal_pending(current)) {				\
+			__ret = -ERESTARTSYS;				\
+			break;						\
 		}							\
-		__ret = -ERESTARTSYS;					\
-		break;							\
+		spu_release(ctx);					\
+		schedule();						\
+		spu_acquire(ctx);					\
 	}								\
 	finish_wait(&(wq), &__wait);					\
 	__ret;								\

             reply	other threads:[~2007-04-13  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  1:48 Jeremy Kerr [this message]
2007-04-13  7:07 ` [Cbe-oss-dev] [PATCH 2/4] spufs: Minor cleanup of spu_wait Christoph Hellwig

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=1176428939.306624.199053139724.qpush@pokey \
    --to=jk@ozlabs.org \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox