New upstream version 17.11.3
[deb_dpdk.git] / examples / performance-thread / common / lthread_api.h
index ec97610..a74680b 100644 (file)
 #ifndef LTHREAD_H
 #define LTHREAD_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdint.h>
 #include <sys/socket.h>
 #include <fcntl.h>
@@ -139,7 +143,7 @@ struct lthread_mutex;
 struct lthread_condattr;
 struct lthread_mutexattr;
 
-typedef void (*lthread_func_t) (void *);
+typedef void *(*lthread_func_t) (void *);
 
 /*
  * Define the size of stack for an lthread
@@ -829,4 +833,8 @@ int lthread_cond_signal(struct lthread_cond *c);
   */
 int lthread_cond_broadcast(struct lthread_cond *c);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif                         /* LTHREAD_H */