Browse Source

Merge commit '105489a' into bfgminer

Luke Dashjr 11 years ago
parent
commit
bcad10b328
3 changed files with 4 additions and 7 deletions
  1. 1 1
      driver-opencl.c
  2. 1 1
      miner.h
  3. 2 5
      util.c

+ 1 - 1
driver-opencl.c

@@ -1283,7 +1283,7 @@ void *reinit_gpu(void *userdata)
 
 
 select_cgpu:
 select_cgpu:
 	sel_cgpu =
 	sel_cgpu =
-	cgpu = tq_pop(mythr->q, NULL);
+	cgpu = tq_pop(mythr->q);
 	if (!cgpu)
 	if (!cgpu)
 		goto out;
 		goto out;
 	
 	

+ 1 - 1
miner.h

@@ -1508,7 +1508,7 @@ extern bool pool_may_redirect_to(struct pool *, const char *uri);
 extern struct thread_q *tq_new(void);
 extern struct thread_q *tq_new(void);
 extern void tq_free(struct thread_q *tq);
 extern void tq_free(struct thread_q *tq);
 extern bool tq_push(struct thread_q *tq, void *data);
 extern bool tq_push(struct thread_q *tq, void *data);
-extern void *tq_pop(struct thread_q *tq, const struct timespec *abstime);
+extern void *tq_pop(struct thread_q *);
 extern void tq_freeze(struct thread_q *tq);
 extern void tq_freeze(struct thread_q *tq);
 extern void tq_thaw(struct thread_q *tq);
 extern void tq_thaw(struct thread_q *tq);
 extern bool successful_connect;
 extern bool successful_connect;

+ 2 - 5
util.c

@@ -948,7 +948,7 @@ bool tq_push(struct thread_q *tq, void *data)
 	return rc;
 	return rc;
 }
 }
 
 
-void *tq_pop(struct thread_q *tq, const struct timespec *abstime)
+void *tq_pop(struct thread_q * const tq)
 {
 {
 	struct tq_ent *ent;
 	struct tq_ent *ent;
 	void *rval = NULL;
 	void *rval = NULL;
@@ -958,10 +958,7 @@ void *tq_pop(struct thread_q *tq, const struct timespec *abstime)
 	if (tq->q)
 	if (tq->q)
 		goto pop;
 		goto pop;
 
 
-	if (abstime)
-		rc = pthread_cond_timedwait(&tq->cond, &tq->mutex, abstime);
-	else
-		rc = pthread_cond_wait(&tq->cond, &tq->mutex);
+	rc = pthread_cond_wait(&tq->cond, &tq->mutex);
 	if (rc)
 	if (rc)
 		goto out;
 		goto out;
 	if (!tq->q)
 	if (!tq->q)