33 lines
965 B
C
33 lines
965 B
C
#include "engine.h"
|
|
#include <string.h>
|
|
void engine_init(Engine *engine)
|
|
{
|
|
memset(engine, 0, sizeof(*engine));
|
|
}
|
|
void engine_command(Engine *engine, const Command *command, Observation *out)
|
|
{
|
|
(void)engine;
|
|
(void)command;
|
|
(void)out;
|
|
}
|
|
|
|
void engine_snapshot(const Engine *engine, Observation *out)
|
|
{
|
|
int slot;
|
|
observe_value(out, engine->head);
|
|
observe_value(out, engine->count);
|
|
observe_value(out, engine->posted);
|
|
observe_value(out, engine->callbacks);
|
|
observe_value(out, engine->dispatched);
|
|
observe_value(out, engine->rejected);
|
|
observe_value(out, engine->reentered);
|
|
observe_value(out, engine->hook_action);
|
|
observe_value(out, engine->locked);
|
|
observe_value(out, engine->dispatching);
|
|
for (slot = 0; slot < 4; slot++) {
|
|
observe_value(out, engine->listener[slot].active);
|
|
observe_value(out, engine->listener[slot].mask);
|
|
observe_value(out, engine->listener[slot].generation);
|
|
}
|
|
}
|