Revert "Make the pthread cond wait in the getwork scheduler a timed wait in case we miss a wakeup." This reverts commit 47a20fb8e813f427357dd8133f811e45f6892ede. Wrong fix.
diff --git a/cgminer.c b/cgminer.c
index 858876e..a9a1ead 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -8349,8 +8349,6 @@ begin_bench:
int ts, max_staged = opt_queue;
struct pool *pool, *cp;
bool lagging = false;
- struct timespec then;
- struct timeval now;
struct work *work;
if (opt_work_update)
@@ -8363,10 +8361,6 @@ begin_bench:
if (!pool_localgen(cp) && !staged_rollable)
max_staged += mining_threads;
- cgtime(&now);
- then.tv_sec = now.tv_sec + 2;
- then.tv_nsec = now.tv_usec * 1000;
-
mutex_lock(stgd_lock);
ts = __total_staged();
@@ -8375,7 +8369,7 @@ begin_bench:
/* Wait until hash_pop tells us we need to create more work */
if (ts > max_staged) {
- pthread_cond_timedwait(&gws_cond, stgd_lock, &then);
+ pthread_cond_wait(&gws_cond, stgd_lock);
ts = __total_staged();
}
mutex_unlock(stgd_lock);