Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert van Renesse committed Aug 22, 2023
2 parents 2ca6099 + 395fb43 commit f7feb47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions harmony_model_checker/charm/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ struct access_info {
// but, for memory efficiency, not the details of the microsteps themselves. If
// a failure is found, that information is recovered by re-executing the path to
// the faulty state.
//
// TODO. Can replace ctx with ctx_index into src->state, but should also
// support, say, -1 for inv_context. after could be replaced with
// an index into dst->state. choice could be the first entry in log
// Doing all three could save around 20 bytes per edge.
struct edge {
struct edge *fwdnext; // forward linked list maintenance
hvalue_t ctx, choice; // ctx that made the microstep, choice if any
Expand Down
3 changes: 2 additions & 1 deletion harmony_model_checker/charm/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,7 @@ void op_Go(
struct context *copy = (struct context *) buffer;
ctx_push(copy, result);
copy->stopped = false;
// TODO. Check success of context_add
context_add(state, value_put_context(&step->engine, copy));
#ifdef HEAP_ALLOC
free(buffer);
Expand Down Expand Up @@ -2136,7 +2137,7 @@ void op_Spawn(
}
else {
hvalue_t context = value_put_context(&step->engine, ctx);
if (!context_add(state, context)) {
if (context_add(state, context) < 0) {
value_ctx_failure(step->ctx, &step->engine, "spawn: too many threads");
return;
}
Expand Down

0 comments on commit f7feb47

Please sign in to comment.