mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-09 20:11:00 +00:00
wrong file.. cslaves keep state (but don't do anything with it yet)
This commit is contained in:
parent
7502990918
commit
a363c6f255
@ -60,10 +60,6 @@ volatile mapping _costate, _cmemory;
|
|||||||
volatile mapping ctemp, cunused;
|
volatile mapping ctemp, cunused;
|
||||||
#endif // }}}
|
#endif // }}}
|
||||||
|
|
||||||
#ifdef USE_SPYC
|
|
||||||
mapping _state; // an alternative to ifdef CONTEXT_STATE ?
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PERSISTENT_SLAVES
|
#ifdef PERSISTENT_SLAVES
|
||||||
int revision; // persistent revision counter
|
int revision; // persistent revision counter
|
||||||
#endif
|
#endif
|
||||||
@ -90,9 +86,6 @@ create() {
|
|||||||
ctemp = ([ ]);
|
ctemp = ([ ]);
|
||||||
_cmemory = m_allocate(0, 2);
|
_cmemory = m_allocate(0, 2);
|
||||||
#endif // }}}
|
#endif // }}}
|
||||||
#ifdef USE_SPYC
|
|
||||||
_state = ([ ]);
|
|
||||||
#endif
|
|
||||||
::create();
|
::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,19 +287,6 @@ insert_member(source, origin) {
|
|||||||
P3(("%O -> _routes = %O\n", ME, _routes))
|
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
|
// code duplicaton is faster than others
|
||||||
#ifdef CONTEXT_STATE // {{{
|
#ifdef CONTEXT_STATE // {{{
|
||||||
//
|
//
|
||||||
|
@ -29,11 +29,16 @@ private int _revision = -1;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONTEXT_STATE
|
#ifdef CONTEXT_STATE
|
||||||
|
// cslaves should store their copy of state, so it shouldn't be volatile here
|
||||||
private volatile mapping cast_state;
|
private volatile mapping cast_state;
|
||||||
private volatile mapping temp_state;
|
private volatile mapping temp_state;
|
||||||
inherit NET_PATH "state";
|
inherit NET_PATH "state";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_SPYC
|
||||||
|
mapping _state; // should probably merge with ifdef CONTEXT_STATE..
|
||||||
|
#endif
|
||||||
|
|
||||||
private volatile mapping _members;
|
private volatile mapping _members;
|
||||||
|
|
||||||
void create() {
|
void create() {
|
||||||
@ -42,6 +47,9 @@ void create() {
|
|||||||
unless(mappingp(cast_state)) cast_state = ([ ]);
|
unless(mappingp(cast_state)) cast_state = ([ ]);
|
||||||
unless(mappingp(temp_state)) temp_state = ([ ]);
|
unless(mappingp(temp_state)) temp_state = ([ ]);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_SPYC
|
||||||
|
unless(mappingp(_state)) _state = ([ ]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PERSISTENT_SLAVES
|
#ifdef PERSISTENT_SLAVES
|
||||||
@ -264,3 +272,16 @@ void Diminish(mixed source, string key, mixed value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // }}}
|
#endif // }}}
|
||||||
|
|
||||||
|
#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
|
||||||
|
Loading…
Reference in New Issue
Block a user