From 120595a6d8031d740df752f32b54f4e48a11981e Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Sun, 13 Dec 2009 15:06:15 -0500 Subject: Fix some compilation warnings --- bin/base_mt_task.c | 7 ++++--- bin/common.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/base_mt_task.c b/bin/base_mt_task.c index a1e3731..19afb28 100644 --- a/bin/base_mt_task.c +++ b/bin/base_mt_task.c @@ -37,7 +37,7 @@ struct thread_context { /* The real-time thread program. Doesn't have to be the same for * all threads. Here, we only have one that will invoke job(). */ -void* rt_thread(struct thread_context* ctx); +void* rt_thread(void *tcontext); /* Declare the periodically invoked job. * Returns 1 -> task should exit. @@ -95,7 +95,7 @@ int main(int argc, char** argv) */ for (i = 0; i < NUM_THREADS; i++) { ctx[i].id = i; - pthread_create(task + i, NULL, rt_thread, ctx + i); + pthread_create(task + i, NULL, rt_thread, (void *) (ctx + i)); } @@ -118,9 +118,10 @@ int main(int argc, char** argv) * real-time app. Notice, that init_rt_thread() is called to initialized per-thread * data structures of the LITMUS^RT user space libary. */ -void* rt_thread(struct thread_context* ctx) +void* rt_thread(void *tcontext) { int do_exit; + struct thread_context *ctx = (struct thread_context *) tcontext; /* Make presence visible. */ printf("RT Thread %d active.\n", ctx->id); diff --git a/bin/common.c b/bin/common.c index 0a5f5c5..452b882 100644 --- a/bin/common.c +++ b/bin/common.c @@ -1,4 +1,5 @@ #include +#include #include #include "common.h" -- cgit v1.2.2