|
@@ -25,6 +25,10 @@
|
|
|
#include <stdlib.h>
|
|
|
#include <math.h>
|
|
|
#include <pthread.h>
|
|
|
+#ifdef __linux__
|
|
|
+#include <sys/resource.h>
|
|
|
+#include <sys/syscall.h>
|
|
|
+#endif
|
|
|
#ifdef STARPU_HAVE_SCHED_YIELD
|
|
|
#include <sched.h>
|
|
|
#endif
|
|
@@ -90,6 +94,12 @@
|
|
|
#define STARPU_UYIELD() _STARPU_UYIELD()
|
|
|
#endif
|
|
|
|
|
|
+#if !defined(STARPU_SIMGRID) && defined(__linux__) && defined(SYS_gettid)
|
|
|
+#define STARPU_PTHREAD_DEPRESS_PRIORITY() setpriority(PRIO_PROCESS, syscall(SYS_gettid), 19)
|
|
|
+#else
|
|
|
+#define STARPU_PTHREAD_DEPRESS_PRIORITY() ((void)0)
|
|
|
+#endif
|
|
|
+
|
|
|
#ifdef STARPU_VERBOSE
|
|
|
# define _STARPU_DEBUG(fmt, ...) do { if (!_starpu_silent) {fprintf(stderr, STARPU_DEBUG_PREFIX"[%s] " fmt ,__starpu_func__ ,## __VA_ARGS__); fflush(stderr); }} while(0)
|
|
|
#else
|