]> git.itanic.dy.fi Git - rrdd/commitdiff
Rename init_max_jobs() to init_jobcontrol()
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 12 May 2012 19:14:00 +0000 (22:14 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 12 May 2012 19:14:00 +0000 (22:14 +0300)
This describes better what the function does; it initializes the
entire jobcontrol into functional state. That is more than setting the
number of maximum jobs.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c
process.c
process.h

diff --git a/main.c b/main.c
index d0ba0adbff76e8006215f3984ebb8601bcbe28db..9bb12f7ceb96c514a8e0ee511d130d5cc1260402 100644 (file)
--- a/main.c
+++ b/main.c
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
 
        rrdtool_create_missing_databases(all_rrds);
 
-       init_max_jobs(opts.max_jobs);
+       init_jobcontrol(opts.max_jobs);
 
        while (1) {
                pr_info("loop start\n");
index d37435779ce1a4c0971e0e128e221938d9ca5476..6d309f671aa2ac97486411262c4334d79cd5d138 100644 (file)
--- a/process.c
+++ b/process.c
@@ -67,11 +67,12 @@ static int cancel_sigchild_handler(void)
  * Initialize the jobcontrol.
  *
  * Create the pipes that are used to grant children execution
- * permissions. If max_jobs is zero, count the CPUs from /proc/cpuinfo
- * and use that.
+ * permissions. If max_jobs is zero, count the number of CPUs from
+ * /proc/cpuinfo and use that.
  */
-int init_max_jobs(int max_jobs_requested)
+int init_jobcontrol(int max_jobs_requested)
 {
+       struct epoll_event ev;
        FILE *file;
        int ret;
        char buf[256];
index 6b5e33e7e7cfb8e80f496b8605dc4c3f48b61dcd..7d0e45a543ebc21ecd2b5e74b23bffc7a751138d 100644 (file)
--- a/process.h
+++ b/process.h
@@ -12,7 +12,7 @@
 int get_child_count(void);
 int get_parent_count(void);
 
-int init_max_jobs(int max_jobs_requested);
+int init_jobcontrol(int max_jobs_requested);
 int poll_job_requests(int timeout);
 int do_fork(void);
 int do_fork_limited(void);