lib*.h: wrap C headers in `extern "C"'
[model-checker.git] / libthreads.h
index b16c96be83dc4aab21b77f46b3579574a861c137..72cc00b8e1532606659d43814de88afe6d0697e0 100644 (file)
@@ -1,16 +1,24 @@
 #ifndef __LIBTHREADS_H__
 #define __LIBTHREADS_H__
 
-typedef int thread_id_t;
-typedef void (*thrd_start_t)();
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-typedef thread_id_t thrd_t;
+       typedef int thread_id_t;
+       typedef void (*thrd_start_t)();
 
-int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
-int thrd_join(thrd_t);
-int thrd_yield(void);
-thrd_t thrd_current(void);
+       typedef thread_id_t thrd_t;
 
-extern void user_main(void);
+       int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
+       int thrd_join(thrd_t);
+       int thrd_yield(void);
+       thrd_t thrd_current(void);
+
+       extern void user_main(void);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* __LIBTHREADS_H__ */