summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jobs.c4
-rw-r--r--src/jobs.h7
-rw-r--r--src/main.c4
3 files changed, 10 insertions, 5 deletions
diff --git a/src/jobs.c b/src/jobs.c
index 4b4472e5..952720bd 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -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;
diff --git a/src/jobs.h b/src/jobs.h
index e61b2c70..7be9e69e 100644
--- a/src/jobs.h
+++ b/src/jobs.h
@@ -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);
diff --git a/src/main.c b/src/main.c
index df35d88d..952b4868 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}