summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-11-04 14:10:39 -0700
committerSimon Marlow <marlowsd@gmail.com>2016-11-07 08:37:46 +0000
commit91f9e13887f49c28e4dbde4edc2c5c65de44c9e9 (patch)
treea22546cf38a32970c3d8475c7f9d696e362eee6f /testsuite/tests/concurrent
parent7d988dd4b2aa270a3b2c3561b3e930b2dc1a675c (diff)
downloadhaskell-91f9e13887f49c28e4dbde4edc2c5c65de44c9e9.tar.gz
Fix hs_try_putmvar003 (#12800)
Summary: There was a race condition on some shared data when creating the callback thread. I couldn't repro the issue without inserting a dummy usleep(100), but it's definitely a bug. Test Plan: validate Reviewers: bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2678 GHC Trac Issues: #12800
Diffstat (limited to 'testsuite/tests/concurrent')
-rw-r--r--testsuite/tests/concurrent/should_run/hs_try_putmvar003_c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar003_c.c b/testsuite/tests/concurrent/should_run/hs_try_putmvar003_c.c
index c499b72056..aa6514407a 100644
--- a/testsuite/tests/concurrent/should_run/hs_try_putmvar003_c.c
+++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar003_c.c
@@ -54,9 +54,9 @@ struct callback_queue* mkCallbackQueue(int use_foreign_export)
pthread_t t;
pthread_mutex_init(&q->lock, NULL);
pthread_cond_init(&q->cond, NULL);
- pthread_create(&t, NULL, (threadfunc*)callback, q);
q->pending = NULL;
q->use_foreign_export = use_foreign_export;
+ pthread_create(&t, NULL, (threadfunc*)callback, q);
return q;
}