SCM Repository
Diff of /branches/pure-cfg/src/lib/main.c
Parent Directory
|
Revision Log
|
Patch
revision 1105, Wed May 4 21:00:49 2011 UTC | revision 1106, Wed May 4 21:01:25 2011 UTC | |
---|---|---|
# | Line 51 | Line 51 |
51 | if (wrld->isActive[i]) { | if (wrld->isActive[i]) { |
52 | nUpdates++; | nUpdates++; |
53 | StrandStatus_t sts = Diderot_Strands[0]->update(wrld->inState[i], wrld->outState[i]); | StrandStatus_t sts = Diderot_Strands[0]->update(wrld->inState[i], wrld->outState[i]); |
54 | if (sts == DIDEROT_STABILIZE) { | switch (sts) |
55 | case DIDEROT_STABILIZE: | |
56 | // copy out to in so that both copies are the stable state | // copy out to in so that both copies are the stable state |
57 | // FIXME: there is a race condition here, since other strands might query this strand | // FIXME: there is a race condition here, since other strands might query this strand |
58 | memcpy (wrld->inState[i], wrld->outState[i], Diderot_Strands[0]->stateSzb); | memcpy (wrld->inState[i], wrld->outState[i], Diderot_Strands[0]->stateSzb); |
59 | wrld->isActive[i] = false; | wrld->isActive[i] = false; |
60 | nActive--; | nActive--; |
61 | break; | |
62 | case DIDEROT_DIE: | |
63 | wrld->isActive[i] = false; | |
64 | nActive--; | |
65 | break; | |
66 | } | } |
67 | } | } |
68 | } | } |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |