]> git.pond.sub.org Git - empserver/commit
Add sequence numbers to game state (experimental)
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 21 Mar 2008 13:22:07 +0000 (14:22 +0100)
committerMarkus Armbruster <armbru@pike.pond.sub.org>
Wed, 7 May 2008 08:33:41 +0000 (10:33 +0200)
commitdc9d847b8ba8bcf7da2ca7b47695abf51745f3eb
tree421c9ff4e3be817d4dc633abbdd14dbce4e41659
parent2aec870a145af4fed8f9f9231ddc745b0ad9724a
Add sequence numbers to game state (experimental)

This catches output dependency violations, e.g. two threads doing a
read-modify-write without synchronization.

New struct emptypedstr member seqno.  Make sure all members of unit
empobj_storage share it.  Set it in ef_blank() and ef_set_uid(), step
it in ef_write().  fairland and files don't use ef_set_uid(); need to
set it manually in files.c's main() and file_sct_init().

Factor do_read() out of fillcache() to make it available for
new get_seqno().
20 files changed:
include/commodity.h
include/empobj.h
include/file.h
include/game.h
include/land.h
include/loan.h
include/lost.h
include/nat.h
include/news.h
include/nuke.h
include/plane.h
include/sect.h
include/ship.h
include/trade.h
include/treaty.h
src/lib/commands/edit.c
src/lib/commands/swap.c
src/lib/common/file.c
src/lib/subs/nreport.c
src/util/files.c