Abstract from update trigger mechanism:

(update_trigger): New.
(force, zdon): Use it.
(update_sem, update_force): Internal linkage.

(update_trigger, update_force): Passing a pointer to static storage as
thread argument is racy.  Use dynamic allocation.
This commit is contained in:
Markus Armbruster 2007-01-19 06:46:10 +00:00
parent 553662f305
commit 861112f827
4 changed files with 38 additions and 10 deletions

View file

@ -52,7 +52,6 @@
#include <config.h>
#include "commands.h"
#include "empthread.h"
#include "optlist.h"
#include "server.h"
@ -142,7 +141,7 @@ zdon(void)
if (!checking && wantupd && demandupdatecheck()) {
pr("Here goes...\n");
empth_sem_signal(update_sem);
update_trigger(0);
}
return RET_OK;
}