Add the relevent attributes in non-Linux wrapper code.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0c50dc57f71804aa544350178793bdf280a667df
#include <sys/umtx.h>
static inline int futex_async(int32_t *uaddr, int op, int32_t val,
- const struct timespec *timeout, int32_t *uaddr2, int32_t val3)
+ const struct timespec *timeout,
+ int32_t *uaddr2 __attribute__((unused)),
+ int32_t val3 __attribute__((unused)))
{
int umtx_op;
void *umtx_uaddr = NULL, *umtx_uaddr2 = NULL;
* This is not generic.
*/
static
-void *mremap_wrapper(void *old_address, size_t old_size,
- size_t new_size, int flags)
+void *mremap_wrapper(void *old_address __attribute__((unused)),
+ size_t old_size __attribute__((unused)),
+ size_t new_size __attribute__((unused)),
+ int flags)
{
assert(!(flags & MREMAP_MAYMOVE));
}
#else
static
-int set_thread_cpu_affinity(struct call_rcu_data *crdp)
+int set_thread_cpu_affinity(struct call_rcu_data *crdp __attribute__((unused)))
{
return 0;
}
return ret;
}
#else
-static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue)
+static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue __attribute__((unused)))
{
return 0;
}
}
}
+#ifdef HAVE_SCHED_SETAFFINITY
static void run_on(int cpu)
{
-#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
sched_setaffinity(0, sizeof(mask), &mask);
-#endif /* HAVE_SCHED_SETAFFINITY */
}
+#else
+
+static void run_on(int cpu __attribute__((unused)))
+{}
+#endif /* HAVE_SCHED_SETAFFINITY */
/*
* timekeeping -- very crude -- should use MONOTONIC...
* Mainprogram.
*/
+static
+void usage(char *argv[]) __attribute__((noreturn));
+
static
void usage(char *argv[])
{