Remove the concept of thread priorities from empthread.h. Only LWP

supports priorities.  Update synchronization used to rely on them,
which naturally worked only with LWP (#1504036).  With that fixed, no
uses of priorities remained, but a minor bug did: players could starve
out threads with priorities below PP_PLAYER, i.e. delete_lostitems()
and player_kill_idle().  Closes #1458175:
(empth_create): Remove parameter prio.  Callers changed.  Also gets
rid of misleading comments in pthread.c and ntthread.c.
(PP_MAIN, PP_UPDATE, PP_SHUTDOWN, PP_SCHED, PP_TIMESTAMP, PP_PLAYER)
(PP_ACCEPT, PP_KILLIDLE): Remove.
(empth_init, empth_create) [EMPTH_LWP]: Pass priority 1.
This commit is contained in:
Markus Armbruster 2007-07-24 05:13:31 +00:00
parent 7536a38e95
commit d500a7071c
9 changed files with 13 additions and 38 deletions

View file

@ -331,12 +331,9 @@ start_server(int flags)
if (journal_startup() < 0)
exit(1);
empth_create(PP_ACCEPT, player_accept, (50 * 1024), flags,
"AcceptPlayers", 0);
empth_create(PP_KILLIDLE, player_kill_idle, (50 * 1024), flags,
"KillIdle", 0);
empth_create(PP_TIMESTAMP, delete_lostitems, (50 * 1024), flags,
"DeleteItems", 0);
empth_create(player_accept, 50 * 1024, flags, "AcceptPlayers", 0);
empth_create(player_kill_idle, 50 * 1024, flags, "KillIdle", 0);
empth_create(delete_lostitems, 50 * 1024, flags, "DeleteItems", 0);
market_init();
update_init();