[Cbe-oss-dev] [PATCH 2/4] spufs: Minor cleanup of spu_wait

Jeremy Kerr jk at ozlabs.org
Fri Apr 13 11:48:59 EST 2007


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

Signed-off-by: Jeremy Kerr <jk at 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;								\



More information about the cbe-oss-dev mailing list