Fix a potential useless CPU time eating.

PR:		30554
Submitted by:	Jose M. Alcaide <jose@we.lc.ehu.es>, Chris Vance
This commit is contained in:
Maxim Sobolev 2001-09-14 13:25:15 +00:00
parent 2b9a8b5e1f
commit b135d533e0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=47834
4 changed files with 30 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= pan
PORTVERSION= 0.10.0.90
PORTREVISION= 1
CATEGORIES= news gnome
MASTER_SITES= http://pan.rebelbase.com/download/${PORTVERSION}/SOURCE/

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- pan/queue.c 2001/09/14 13:20:29 1.1
+++ pan/queue.c 2001/09/14 13:20:44
@@ -1202,7 +1202,7 @@
pthread_mutex_lock (&queue_lock);
gettimeofday (&now, NULL);
timeout.tv_sec = now.tv_sec + TIMEOUT_SECS;
- timeout.tv_nsec = timeout.tv_sec;
+ timeout.tv_nsec = 0;
retcode = pthread_cond_timedwait(&qcond, &queue_lock, &timeout);
pthread_mutex_unlock (&queue_lock);

View file

@ -7,6 +7,7 @@
PORTNAME= pan
PORTVERSION= 0.10.0.90
PORTREVISION= 1
CATEGORIES= news gnome
MASTER_SITES= http://pan.rebelbase.com/download/${PORTVERSION}/SOURCE/

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- pan/queue.c 2001/09/14 13:20:29 1.1
+++ pan/queue.c 2001/09/14 13:20:44
@@ -1202,7 +1202,7 @@
pthread_mutex_lock (&queue_lock);
gettimeofday (&now, NULL);
timeout.tv_sec = now.tv_sec + TIMEOUT_SECS;
- timeout.tv_nsec = timeout.tv_sec;
+ timeout.tv_nsec = 0;
retcode = pthread_cond_timedwait(&qcond, &queue_lock, &timeout);
pthread_mutex_unlock (&queue_lock);