diff --git a/includes/daemon.h b/includes/daemon.h index 85fa6476..507fb835 100644 --- a/includes/daemon.h +++ b/includes/daemon.h @@ -45,7 +45,7 @@ typedef struct { -struct request_queue * render_request_queue; +extern struct request_queue * render_request_queue; void statsRenderFinish(int z, long time); void request_exit(void); diff --git a/includes/render_submit_queue.h b/includes/render_submit_queue.h index 1183623b..65b83fbc 100644 --- a/includes/render_submit_queue.h +++ b/includes/render_submit_queue.h @@ -5,8 +5,6 @@ extern "C" { #endif -int work_complete; - void enqueue(const char *xmlname, int x, int y, int z); void spawn_workers(int num, const char *socketpath, int maxLoad); void wait_for_empty_queue(void); diff --git a/src/daemon.c b/src/daemon.c index 56a5b0b4..4810ec6d 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -49,6 +49,7 @@ static renderd_config config; int noSlaveRenders; +struct request_queue * render_request_queue; static const char *cmdStr(enum protoCmd c) { diff --git a/src/render_expired.c b/src/render_expired.c index 824d587e..98177bda 100644 --- a/src/render_expired.c +++ b/src/render_expired.c @@ -89,7 +89,6 @@ unsigned long long twopow[MAX_ZOOM]; static int minZoom = 0; static int maxZoom = 18; static int verbose = 0; -int work_complete; static int maxLoad = MAX_LOAD_OLD; void display_rate(struct timeval start, struct timeval end, int num) diff --git a/src/render_list.c b/src/render_list.c index bc0f032b..cb11c206 100644 --- a/src/render_list.c +++ b/src/render_list.c @@ -40,7 +40,6 @@ static int maxZoom = MAX_ZOOM; static int verbose = 0; static int maxLoad = MAX_LOAD_OLD; -int work_complete; void display_rate(struct timeval start, struct timeval end, int num) { diff --git a/src/render_old.c b/src/render_old.c index 5e83cbd5..42b12fcb 100644 --- a/src/render_old.c +++ b/src/render_old.c @@ -47,7 +47,6 @@ static time_t planetTime; static struct timeval start, end; -int work_complete; void display_rate(struct timeval start, struct timeval end, int num) { diff --git a/src/render_submit_queue.c b/src/render_submit_queue.c index 5d639871..0f850a69 100644 --- a/src/render_submit_queue.c +++ b/src/render_submit_queue.c @@ -47,6 +47,7 @@ static struct qItem *qHead, *qTail; static int no_workers; static pthread_t *workers; +static int work_complete; static void check_load(void) {