#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" {
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);