diff options
Diffstat (limited to 'examples/performance-thread/pthread_shim')
-rw-r--r-- | examples/performance-thread/pthread_shim/main.c | 6 | ||||
-rw-r--r-- | examples/performance-thread/pthread_shim/pthread_shim.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c index 964ea252..7d0d5811 100644 --- a/examples/performance-thread/pthread_shim/main.c +++ b/examples/performance-thread/pthread_shim/main.c @@ -119,8 +119,7 @@ void *helloworld_pthread(void *arg) */ __thread pthread_t tid[HELLOW_WORLD_MAX_LTHREADS]; -static void initial_lthread(void *args); -static void initial_lthread(void *args __attribute__((unused))) +static void *initial_lthread(void *args __attribute__((unused))) { int lcore = (int) rte_lcore_id(); /* @@ -195,6 +194,7 @@ static void initial_lthread(void *args __attribute__((unused))) /* shutdown the lthread scheduler */ lthread_scheduler_shutdown(rte_lcore_id()); lthread_detach(); + return NULL; } @@ -205,8 +205,6 @@ static void initial_lthread(void *args __attribute__((unused))) * in the core mask */ static int -lthread_scheduler(void *args); -static int lthread_scheduler(void *args __attribute__((unused))) { /* create initial thread */ diff --git a/examples/performance-thread/pthread_shim/pthread_shim.c b/examples/performance-thread/pthread_shim/pthread_shim.c index c31de4e9..53f12437 100644 --- a/examples/performance-thread/pthread_shim/pthread_shim.c +++ b/examples/performance-thread/pthread_shim/pthread_shim.c @@ -365,7 +365,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) int pthread_create(pthread_t *__restrict tid, const pthread_attr_t *__restrict attr, - void *(func) (void *), + lthread_func_t func, void *__restrict arg) { if (override) { @@ -390,7 +390,7 @@ pthread_create(pthread_t *__restrict tid, } } return lthread_create((struct lthread **)tid, lcore, - (void (*)(void *))func, arg); + func, arg); } return _sys_pthread_funcs.f_pthread_create(tid, attr, func, arg); } |