]> git.pond.sub.org Git - empserver/commit
Rewrite how updates are triggered (closes #1504036):
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 8 Feb 2007 11:54:31 +0000 (11:54 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 8 Feb 2007 11:54:31 +0000 (11:54 +0000)
commitc1eb1bd5d2f5e9e0c1a8fed4a5090efbb31aa09c
tree6d9aa50ed135de4b687454eb11f38da3866e2417
parentcea39829af96700dd083bf6e17593c2b6fce1685
Rewrite how updates are triggered (closes #1504036):
(update_init, update_sched, update_run, update_wait): Don't create a
separate UpdateSched thread, run update_sched() in the Update thread.
Run the update by calling update_run() instead of by signalling its
thread.  update_run() replaces update_wait(); it just runs the update
and returns instead of waiting for the signal to update in a loop.
Move initialization of the Update thread's *player to its new thread
entry point.
(update_sem, update_init): Remove update_sem.
(update_thread): New.
(update_init): Initialize it.
(update_forced): New.
(update_trigger, update_force): Wake up update_thread with
update_force set.
(update_sched): Reset it before sleep, test it after sleep so that
schedule checking is only done for scheduled updates, not forced
updates.

(update_sched, update_init): Move sanity test of s_p_etu to
update_init().
src/server/update.c