Browse Source

Fixes comment style in files in the include directory to allow
compiling as strict c89. Use __inline instead of inline

From: Jonathan Adamczewski <jadamcze@utas.edu.au>

Samuel Thibault 14 years ago
parent
commit
17e420dd09

+ 1 - 1
include/starpu.h

@@ -148,4 +148,4 @@ int starpu_worker_get_devid(int id);
 }
 #endif
 
-#endif // __STARPU_H__
+#endif /* __STARPU_H__ */

+ 2 - 2
include/starpu_cuda.h

@@ -85,6 +85,6 @@ cudaStream_t starpu_cuda_get_local_stream(void);
 }
 #endif
 
-#endif // STARPU_USE_CUDA
-#endif // __STARPU_CUDA_H__
+#endif /* STARPU_USE_CUDA */
+#endif /* __STARPU_CUDA_H__ */
 

+ 1 - 1
include/starpu_data.h

@@ -97,4 +97,4 @@ int starpu_data_get_rank(starpu_data_handle handle);
 }
 #endif
 
-#endif // __STARPU_DATA_H__
+#endif /* __STARPU_DATA_H__ */

+ 2 - 2
include/starpu_data_interfaces.h

@@ -259,7 +259,7 @@ typedef struct starpu_bcsr_interface_s {
 
 	uintptr_t nzval; /* non-zero values */
 	uint32_t *colind; /* position of non-zero entried on the row */
-//	uint32_t *rowind; /* position of non-zero entried on the col */
+/*	uint32_t *rowind; */ /* position of non-zero entried on the col */
 	uint32_t *rowptr; /* index (in nzval) of the first entry of the row */
 
         /* k for k-based indexing (0 or 1 usually) */
@@ -302,4 +302,4 @@ unsigned starpu_get_handle_interface_id(starpu_data_handle);
 }
 #endif
 
-#endif // __STARPU_DATA_INTERFACES_H__
+#endif /* __STARPU_DATA_INTERFACES_H__ */

+ 1 - 1
include/starpu_expert.h

@@ -33,4 +33,4 @@ void starpu_progression_hook_deregister(int hook_id);
 }
 #endif
 
-#endif // __STARPU_H__
+#endif /* __STARPU_H__ */

+ 2 - 2
include/starpu_opencl.h

@@ -208,6 +208,6 @@ int starpu_opencl_collect_stats(cl_event event);
 }
 #endif
 
-#endif // STARPU_USE_OPENCL
-#endif // __STARPU_OPENCL_H__
+#endif /* STARPU_USE_OPENCL */
+#endif /* __STARPU_OPENCL_H__ */
 

+ 1 - 1
include/starpu_perfmodel.h

@@ -130,4 +130,4 @@ void starpu_force_bus_sampling(void);
 }
 #endif
 
-#endif // __STARPU_PERFMODEL_H__
+#endif /* __STARPU_PERFMODEL_H__ */

+ 1 - 1
include/starpu_profiling.h

@@ -175,4 +175,4 @@ void starpu_worker_profiling_helper_display_summary(void);
 }
 #endif
 
-#endif // __STARPU_PROFILING_H__
+#endif /* __STARPU_PROFILING_H__ */

+ 1 - 1
include/starpu_scheduler.h

@@ -182,4 +182,4 @@ double starpu_data_expected_transfer_time(starpu_data_handle handle, unsigned me
 /* Returns expected power consumption in J */
 double starpu_task_expected_power(struct starpu_task *task, enum starpu_perf_archtype arch);
 
-#endif // __STARPU_SCHEDULER_H__
+#endif /* __STARPU_SCHEDULER_H__ */

+ 1 - 1
include/starpu_task.h

@@ -265,4 +265,4 @@ struct starpu_task *starpu_get_current_task(void);
 }
 #endif
 
-#endif // __STARPU_TASK_H__
+#endif /* __STARPU_TASK_H__ */

+ 1 - 1
include/starpu_task_list.h

@@ -51,4 +51,4 @@ struct starpu_task *starpu_task_list_pop_front(struct starpu_task_list *list);
 /* Remove the element at the back of the list */
 struct starpu_task *starpu_task_list_pop_back(struct starpu_task_list *list);
 						
-#endif // __STARPU_TASK_LIST_H__
+#endif /* __STARPU_TASK_LIST_H__ */

+ 8 - 7
include/starpu_util.h

@@ -58,11 +58,12 @@ extern "C" {
 #endif
 
 #if defined(__i386__) || defined(__x86_64__)
-static inline unsigned starpu_cmpxchg(unsigned *ptr, unsigned old, unsigned next) {
+
+static __inline unsigned starpu_cmpxchg(unsigned *ptr, unsigned old, unsigned next) {
 	__asm__ __volatile__("lock cmpxchgl %2,%1": "+a" (old), "+m" (*ptr) : "q" (next) : "memory");
 	return old;
 }
-static inline unsigned starpu_xchg(unsigned *ptr, unsigned next) {
+static __inline unsigned starpu_xchg(unsigned *ptr, unsigned next) {
 	/* Note: xchg is always locked already */
 	__asm__ __volatile__("xchgl %1,%0": "+m" (*ptr), "+q" (next) : : "memory");
 	return next;
@@ -71,7 +72,7 @@ static inline unsigned starpu_xchg(unsigned *ptr, unsigned next) {
 #endif
 
 #define STARPU_ATOMIC_SOMETHING(name,expr) \
-static inline unsigned starpu_atomic_##name(unsigned *ptr, unsigned value) { \
+static __inline unsigned starpu_atomic_##name(unsigned *ptr, unsigned value) { \
 	unsigned old, next; \
 	while (1) { \
 		old = *ptr; \
@@ -120,7 +121,7 @@ STARPU_ATOMIC_SOMETHING(or, old | value)
 #define STARPU_SYNCHRONIZE() __asm__ __volatile__("sync" ::: "memory")
 #endif
 
-static inline int starpu_get_env_number(const char *str)
+static __inline int starpu_get_env_number(const char *str)
 {
 	char *strval;
 
@@ -133,12 +134,12 @@ static inline int starpu_get_env_number(const char *str)
 		val = (int)strtol(strval, &check, 10);
 		STARPU_ASSERT(strcmp(check, "\0") == 0);
 
-		//fprintf(stderr, "ENV %s WAS %d\n", str, val);
+		/* fprintf(stderr, "ENV %s WAS %d\n", str, val); */
 		return val;
 	}
 	else {
 		/* there is no such env variable */
-		//fprintf("There was no %s ENV\n", str);
+		/* fprintf("There was no %s ENV\n", str); */
 		return -1;
 	}
 }
@@ -216,4 +217,4 @@ void starpu_pack_cl_args(char **arg_buffer, size_t *arg_buffer_size, ...);
 }
 #endif
 
-#endif // __STARPU_UTIL_H__
+#endif /* __STARPU_UTIL_H__ */