threads: kill clang warnings about struct/class Thread
[model-checker.git] / include / threads.h
index 66df5b1191cfa1d050d020c7bd3a01d3e4bd9fc3..f38be0ab96ecf973873ffc1c03576da0dad47c28 100644 (file)
@@ -6,7 +6,12 @@
 #define __THREADS_H__
 
 /* Forward declaration */
-struct Thread; /* actually, class; but this is safe */
+#ifdef __cplusplus
+typedef class Thread *__thread_identifier;
+#else
+/* For C, we just need an opaque pointer */
+typedef void *__thread_identifier;
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -15,7 +20,7 @@ extern "C" {
        typedef void (*thrd_start_t)(void *);
 
        typedef struct {
-               struct Thread *priv;
+               __thread_identifier priv;
        } thrd_t;
 
        int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);