projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LICENSE: add newline at end of file
[model-checker.git]
/
include
/
threads.h
diff --git
a/include/threads.h
b/include/threads.h
index 641b0cf010927919f349d177110abb7871cf8715..66df5b1191cfa1d050d020c7bd3a01d3e4bd9fc3 100644
(file)
--- a/
include/threads.h
+++ b/
include/threads.h
@@
-5,17
+5,22
@@
#ifndef __THREADS_H__
#define __THREADS_H__
#ifndef __THREADS_H__
#define __THREADS_H__
+/* Forward declaration */
+struct Thread; /* actually, class; but this is safe */
+
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*thrd_start_t)(void *);
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*thrd_start_t)(void *);
- typedef int thrd_t;
+ typedef struct {
+ struct Thread *priv;
+ } thrd_t;
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
int thrd_join(thrd_t);
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
int thrd_join(thrd_t);
-
int
thrd_yield(void);
+
void
thrd_yield(void);
thrd_t thrd_current(void);
int user_main(int, char**);
thrd_t thrd_current(void);
int user_main(int, char**);