aboutsummaryrefslogtreecommitdiffstats
path: root/examples/performance-thread/pthread_shim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/performance-thread/pthread_shim')
-rw-r--r--examples/performance-thread/pthread_shim/main.c6
-rw-r--r--examples/performance-thread/pthread_shim/pthread_shim.c4
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 febae39b..5811cff8 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -149,8 +149,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();
/*
@@ -225,6 +224,7 @@ static void initial_lthread(void *args __attribute__((unused)))
/* shutdown the lthread scheduler */
lthread_scheduler_shutdown(rte_lcore_id());
lthread_detach();
+ return NULL;
}
@@ -235,8 +235,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 bc7cf2b0..24cc3896 100644
--- a/examples/performance-thread/pthread_shim/pthread_shim.c
+++ b/examples/performance-thread/pthread_shim/pthread_shim.c
@@ -394,7 +394,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) {
@@ -419,7 +419,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);
}