[Cbe-oss-dev] [PATCH] libspe2: Fix return value of spe_out_intr_mbox_read

Kazunori Asayama asayama at sm.sony.co.jp
Tue Nov 20 20:35:10 EST 2007


The current implementation of spe_out_intr_mbox_read function can
return wrong value when SPE_MBOX_ALL_BLOCKING behavior flag is
specified, if the read system call on "ibox" is called twice or more
times internally. This patch fixes this problem.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>

OK to apply ?
---
 spebase/mbox.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/spebase/mbox.c
===================================================================
--- a/spebase/mbox.c	2007-08-27 17:45:29.000000000 +0900
+++ b/spebase/mbox.c	2007-11-20 16:27:21.000000000 +0900
@@ -301,7 +301,7 @@ int _base_spe_out_intr_mbox_read(spe_con
 		return -1;
 	}
 
-	return rc / 4;
+	return total / 4;
 }
 
 int _base_spe_signal_write(spe_context_ptr_t spectx, 



More information about the cbe-oss-dev mailing list