Skip to content

Commit

Permalink
move running_count higher in header.c
Browse files Browse the repository at this point in the history
Similarly to state_depth, we're going to need to refer to this earlier.

Github: related to #131 "minimal trace mode"
  • Loading branch information
Smattr committed Jun 16, 2019
1 parent 7e9dd8b commit 009b5a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rumur/resources/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. *
* *
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 009b5a9

Please sign in to comment.