projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Annotation Support
[model-checker.git]
/
include
/
threads.h
diff --git
a/include/threads.h
b/include/threads.h
index 66df5b1191cfa1d050d020c7bd3a01d3e4bd9fc3..f38be0ab96ecf973873ffc1c03576da0dad47c28 100644
(file)
--- a/
include/threads.h
+++ b/
include/threads.h
@@
-6,7
+6,12
@@
#define __THREADS_H__
/* Forward declaration */
#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" {
#ifdef __cplusplus
extern "C" {
@@
-15,7
+20,7
@@
extern "C" {
typedef void (*thrd_start_t)(void *);
typedef struct {
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);
} thrd_t;
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);