]> git.pond.sub.org Git - empserver/blobdiff - src/server/main.c
Rename play_lock back to update_lock
[empserver] / src / server / main.c
index 267de1cdb37d75cb7e6173065d64c704ff3574c1..f67d9b25c1d5213c8e1eca5b41c5369458541525 100644 (file)
@@ -78,7 +78,7 @@ static void loc_NTInit(void);
  * Lock to synchronize player threads with update.
  * Update holds it exclusive, commands hold it shared.
  */
-empth_rwlock_t *play_lock;
+empth_rwlock_t *update_lock;
 /*
  * Lock to synchronize player threads with shutdown.
  * Shutdown holds it exclusive, player threads in state PS_PLAYING
@@ -380,8 +380,9 @@ start_server(int flags)
     if (journal_startup() < 0)
        exit(1);
 
+    update_lock = empth_rwlock_create("Update");
     shutdown_lock = empth_rwlock_create("Shutdown");
-    if (!shutdown_lock)
+    if (!update_lock || !shutdown_lock)
        exit_nomem();
 
     market_init();