Explorar o código

fix previous commit

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
d1820bf537

+ 0 - 2
include/starpu-data-interfaces.h

@@ -193,8 +193,6 @@ size_t starpu_get_bcsr_elemsize(starpu_data_handle);
 
 unsigned starpu_get_handle_interface_id(starpu_data_handle);
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif

+ 4 - 6
src/drivers/core/driver_core.c

@@ -47,7 +47,7 @@ static int execute_job_on_core(job_t j, struct worker_s *core_args)
 	if (ret != 0) {
 		/* there was not enough memory so the codelet cannot be executed right now ... */
 		/* push the codelet back and try another one ... */
-		return STARPU_TRYAGAIN;
+		return -EAGAIN;
 	}
 
 	TRACE_START_CODELET_BODY(j);
@@ -91,7 +91,7 @@ static int execute_job_on_core(job_t j, struct worker_s *core_args)
 
 	core_args->jobq->total_job_performed++;
 
-	return STARPU_SUCCESS;
+	return 0;
 }
 
 void *_starpu_core_worker(void *arg)
@@ -178,11 +178,9 @@ void *_starpu_core_worker(void *arg)
 		}
 
                 res = execute_job_on_core(j, core_arg);
-		if (res != STARPU_SUCCESS) {
+		if (res) {
 			switch (res) {
-				case STARPU_FATAL:
-					assert(0);
-				case STARPU_TRYAGAIN:
+				case -EAGAIN:
 					push_task(j);
 					continue;
 				default: 

+ 4 - 7
src/drivers/cuda/driver_cuda.c

@@ -98,7 +98,7 @@ static int execute_job_on_cuda(job_t j, struct worker_s *args)
 		/* there was not enough memory, so the input of
 		 * the codelet cannot be fetched ... put the 
 		 * codelet back, and try it later */
-		return STARPU_TRYAGAIN;
+		return -EAGAIN;
 	}
 
 	if (calibrate_model || BENCHMARK_COMM)
@@ -145,7 +145,7 @@ static int execute_job_on_cuda(job_t j, struct worker_s *args)
 
 	push_task_output(task, mask);
 
-	return STARPU_SUCCESS;
+	return 0;
 }
 
 void *_starpu_cuda_worker(void *arg)
@@ -246,12 +246,9 @@ void *_starpu_cuda_worker(void *arg)
 
 		res = execute_job_on_cuda(j, args);
 
-		if (res != STARPU_SUCCESS) {
+		if (res) {
 			switch (res) {
-				case STARPU_SUCCESS:
-				case STARPU_FATAL:
-					assert(0);
-				case STARPU_TRYAGAIN:
+				case -EAGAIN:
 					fprintf(stderr, "ouch, put the codelet %p back ... \n", j);
 					push_task(j);
 					STARPU_ABORT();