[Cbe-oss-dev] [PATCH 6/9]MARS: Fix task barrier error check

Yuji Mano yuji.mano at am.sony.com
Sat Oct 18 10:29:01 EST 2008


This fixes a bug in the error checking so task barrier creation so parameter
total==0 will return MARS_ERROR_PARAMS.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>

---
 src/host/lib/task_barrier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/host/lib/task_barrier.c
+++ b/src/host/lib/task_barrier.c
@@ -53,7 +53,7 @@ int mars_task_barrier_create(struct mars
 		return MARS_ERROR_NULL;
 	if (!barrier_ret)
 		return MARS_ERROR_NULL;
-	if (total > MARS_TASK_BARRIER_WAIT_MAX)
+	if (!total || total > MARS_TASK_BARRIER_WAIT_MAX)
 		return MARS_ERROR_PARAMS;
 
 	/* allocate barrier instance */






More information about the cbe-oss-dev mailing list