From 009b5a9deb4cb55c40ef28cf461468bfcbbcb169 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 8 Jun 2019 20:48:26 -0700 Subject: [PATCH] move running_count higher in header.c Similarly to state_depth, we're going to need to refer to this earlier. Github: related to #131 "minimal trace mode" --- rumur/resources/header.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rumur/resources/header.c b/rumur/resources/header.c index eb64019e..361b229f 100644 --- a/rumur/resources/header.c +++ b/rumur/resources/header.c @@ -116,6 +116,9 @@ _Static_assert(MAX_ERRORS > 0, "illegal MAX_ERRORS value"); */ enum { JMP_BUF_NEEDED = MAX_ERRORS > 1 }; +/* How many threads are currently running. */ +static size_t running_count = 1; + /******************************************************************************* * Sandbox support. * * * @@ -2317,7 +2320,6 @@ static void refcounted_ptr_shift(refcounted_ptr_t *NONNULL current, static pthread_mutex_t rendezvous_lock; /* mutual exclusion mechanism for below. */ static pthread_cond_t rendezvous_cond; /* sleep mechanism for below. */ -static size_t running_count = 1; /* how many threads are opted in to rendezvous? */ static size_t rendezvous_pending = 1; /* how many threads are opted in and not sleeping? */ static void rendezvous_init(void) {