1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

are we going to have state implemented just by mistake?

This commit is contained in:
psyc://psyced.org/~lynX 2011-05-23 13:02:04 +02:00
parent c4a915e82f
commit 7502990918
9 changed files with 32 additions and 29 deletions

View file

@ -55,10 +55,15 @@ volatile mapping _routes, _u;
#endif
#ifdef CONTEXT_STATE // {{{
// why volatile.. that breaks the whole meaning of state
volatile mapping _costate, _cmemory;
volatile mapping ctemp, cunused;
#endif // }}}
#ifdef USE_SPYC
mapping _state; // an alternative to ifdef CONTEXT_STATE ?
#endif
#ifdef PERSISTENT_SLAVES
int revision; // persistent revision counter
#endif
@ -85,6 +90,9 @@ create() {
ctemp = ([ ]);
_cmemory = m_allocate(0, 2);
#endif // }}}
#ifdef USE_SPYC
_state = ([ ]);
#endif
::create();
}
@ -286,6 +294,19 @@ insert_member(source, origin) {
P3(("%O -> _routes = %O\n", ME, _routes))
}
#ifdef USE_SPYC
get_state() {
PT(("cstate for %O picked up by %O: %O\n", ME,
previous_object(), _state))
return _state;
}
commit_state() {
PT(("cstate for %O committed by %O: %O\n", ME,
previous_object(), _state))
_state = ([ ]);
}
#endif
// code duplicaton is faster than others
#ifdef CONTEXT_STATE // {{{
//