From fcb265322dffeccf3ddc08f022cf318b57e6812f Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 8 Dec 2012 21:35:14 +1100 Subject: [PATCH] Perform pool_resus on getwork pool that generates work in getwork_thread. --- cgminer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 7398c734..44a24382 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3045,6 +3045,8 @@ static void pool_died(struct pool *pool) static void gen_stratum_work(struct pool *pool, struct work *work); +static void pool_resus(struct pool *pool); + static void *getwork_thread(void __maybe_unused *userdata) { pthread_detach(pthread_self()); @@ -3150,6 +3152,9 @@ retry: goto retry; } pool_tclear(pool, &pool->lagging); + if (pool_tclear(pool, &pool->idle)) + pool_resus(pool); + applog(LOG_DEBUG, "Generated getwork work"); stage_work(work); push_curl_entry(ce, pool); @@ -4582,8 +4587,6 @@ out: return ret; } -static void pool_resus(struct pool *pool); - static void clear_stratum_shares(struct pool *pool) { struct stratum_share *sshare, *tmpshare;