eal: rename lcore master and slave
[dpdk.git] / examples / performance-thread / pthread_shim / pthread_shim.c
index c31de4e..bbc0765 100644 (file)
@@ -6,7 +6,6 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <errno.h>
-#define __USE_GNU
 #include <sched.h>
 #include <dlfcn.h>
 
@@ -342,9 +341,9 @@ int pthread_cond_signal(pthread_cond_t *cond)
 }
 
 int
-pthread_cond_timedwait(pthread_cond_t *__restrict cond,
-                      pthread_mutex_t *__restrict mutex,
-                      const struct timespec *__restrict time)
+pthread_cond_timedwait(pthread_cond_t *__rte_restrict cond,
+                      pthread_mutex_t *__rte_restrict mutex,
+                      const struct timespec *__rte_restrict time)
 {
        NOT_IMPLEMENTED;
        return _sys_pthread_funcs.f_pthread_cond_timedwait(cond, mutex, time);
@@ -363,10 +362,10 @@ 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 *),
-              void *__restrict arg)
+pthread_create(pthread_t *__rte_restrict tid,
+               const pthread_attr_t *__rte_restrict attr,
+               lthread_func_t func,
+              void *__rte_restrict arg)
 {
        if (override) {
                int lcore = -1;
@@ -390,7 +389,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);
 }
@@ -559,7 +558,7 @@ int pthread_rwlock_wrlock(pthread_rwlock_t *a)
        return _sys_pthread_funcs.f_pthread_rwlock_wrlock(a);
 }
 
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
 int
 pthread_yield(void)
 {