Explorar o código

src/core/workers.h: revert 19665 and explain why __starpu_worker_get_id_check return type is unsigned

Nathalie Furmento %!s(int64=9) %!d(string=hai) anos
pai
achega
5ca55cbcb7
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/core/workers.h

+ 2 - 1
src/core/workers.h

@@ -571,7 +571,8 @@ static inline int _starpu_worker_get_id(void)
 #define starpu_worker_get_id _starpu_worker_get_id
 #define starpu_worker_get_id _starpu_worker_get_id
 
 
 /* Similar behaviour to starpu_worker_get_id() but fails when called from outside a worker */
 /* Similar behaviour to starpu_worker_get_id() but fails when called from outside a worker */
-static inline int __starpu_worker_get_id_check(const char *f, int l)
+/* This returns an unsigned object on purpose, so that the caller is sure to get a positive value */
+static inline unsigned __starpu_worker_get_id_check(const char *f, int l)
 {
 {
 	(void) l;
 	(void) l;
 	(void) f;
 	(void) f;