projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libthreads: thrd_join() always return 0
[model-checker.git]
/
libthreads.cc
diff --git
a/libthreads.cc
b/libthreads.cc
index a414686dccb713116bad22a1e6126f590b72cc7b..c54c9aa415e6289c43abcba24e4e3a8d32874755 100644
(file)
--- a/
libthreads.cc
+++ b/
libthreads.cc
@@
-23,11
+23,10
@@
int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg)
int thrd_join(thrd_t t)
{
int thrd_join(thrd_t t)
{
- int ret = 0;
Thread *th = model->get_thread(thrd_to_id(t));
Thread *th = model->get_thread(thrd_to_id(t));
- while (th->get_state() != THREAD_COMPLETED
&& !ret
)
-
ret =
model->switch_to_master(NULL);
- return
ret
;
+ while (th->get_state() != THREAD_COMPLETED)
+ model->switch_to_master(NULL);
+ return
0
;
}
int thrd_yield(void)
}
int thrd_yield(void)