diff options
-rw-r--r-- | src/jobs.c | 4 | ||||
-rw-r--r-- | src/jobs.h | 7 | ||||
-rw-r--r-- | src/main.c | 4 |
3 files changed, 10 insertions, 5 deletions
@@ -732,7 +732,7 @@ struct sd_event *jobs_get_sd_event() * @param start The start routine to activate (can't be NULL) * @return 0 in case of success or -1 in case of error. */ -int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum)) +int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum, void* arg), void *arg) { int rc, launched; struct thread me; @@ -782,7 +782,7 @@ int jobs_start(int allowed_count, int start_count, int waiter_count, void (*star } /* queue the start job */ - job = job_create(NULL, 0, (job_cb_t)start, NULL); + job = job_create(NULL, 0, start, arg); if (!job) { ERROR("out of memory"); errno = ENOMEM; @@ -44,5 +44,10 @@ extern struct sd_event *jobs_get_sd_event(); extern void jobs_terminate(); -extern int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum)); +extern int jobs_start( + int allowed_count, + int start_count, + int waiter_count, + void (*start)(int signum, void* arg), + void *arg); @@ -535,7 +535,7 @@ static void run_startup_calls() | job for starting the daemon +--------------------------------------------------------- */ -static void start(int signum) +static void start(int signum, void *arg) { struct afb_hsrv *hsrv; @@ -674,7 +674,7 @@ int main(int argc, char *argv[]) afb_debug("main-start"); /* enter job processing */ - jobs_start(3, 0, 50, start); + jobs_start(3, 0, 50, start, NULL); WARNING("hoops returned from jobs_enter! [report bug]"); return 1; } |