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:
parent
553662f305
commit
861112f827
4 changed files with 38 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue