From dd2c48ddfc7f8bc62c565b43bbd42a3a2a87836d Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 23 Feb 2016 18:04:52 +0200 Subject: Bugfixes * lib/addrfmt.c: Include limits.h * src/ctl.c (fun_stop,fun_start): Ignore non-component progs. * src/pies.c (request_restart_components): Fix piesctl invocation. * src/pies.h (PIES_CHLD_RESCHEDULE_ALARM): New flag. (progman_wait_until): Remove. (progman_recompute_alarm): New proto. * src/progman.c (recompute_alarm): Remove. All uses raise PIES_CHLD_RESCHEDULE_ALARM instead. (progman_wake_sleeping): Handle status_stopping components independently on their activity flag. (prog_stop_all, progman_wait_until): Remove. (progman_stop): Rewrite using mark+sweep approach. --- src/pies.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/pies.h') diff --git a/src/pies.h b/src/pies.h index 3528e82..37eb4ba 100644 --- a/src/pies.h +++ b/src/pies.h @@ -320,10 +320,11 @@ void free_redirector (struct redirector *rp); void pies_schedule_action (int act); void free_action (struct action *act); -#define PIES_CHLD_NONE 0 -#define PIES_CHLD_CLEANUP 0x01 -#define PIES_CHLD_WAKEUP 0x02 -#define PIES_CHLD_GC 0x04 +#define PIES_CHLD_NONE 0 +#define PIES_CHLD_CLEANUP 0x01 +#define PIES_CHLD_WAKEUP 0x02 +#define PIES_CHLD_GC 0x04 +#define PIES_CHLD_RESCHEDULE_ALARM 0x08 void pies_schedule_children (int op); @@ -338,7 +339,6 @@ void progman_stop (void); void progman_cleanup (int expect_term); void progman_filter (int (*filter) (struct component *, void *data), void *data); -int progman_wait_until (int (*cond) (void *), void *data); int progman_accept (int socket, void *data); void progman_create_sockets (void); @@ -348,6 +348,7 @@ struct component *progman_lookup_tcpmux (const char *service, void progman_run_comp (struct component *comp, int fd, union pies_sockaddr_storage *sa, socklen_t salen); +void progman_recompute_alarm (void); void fd_report (int fd, const char *msg); -- cgit v1.2.1