List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:October 22 2005 2:41am
Subject:bk commit into 4.1 tree (jimw:1.2458) BUG#14094
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mysqldev. When mysqldev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2458 05/10/22 02:41:23 jimw@stripped +1 -0
  Fix SLEEP() on Windows to be more accurate in waiting for the specified
  amount of time. (Bug #14094)

  mysys/my_wincond.c
    1.7 05/10/22 02:34:03 jimw@stripped +3 -4
    Use my_getsystime() to figure out relative time, since it is what we use in
    deriving an absolute time.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jimw
# Host:	production.mysql.com
# Root:	/data0/mysqldev/jimw/mysql-4.1-14094

--- 1.6/mysys/my_wincond.c	2001-12-06 13:10:43 +01:00
+++ 1.7/mysys/my_wincond.c	2005-10-22 02:34:03 +02:00
@@ -54,12 +54,11 @@
 int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
                            struct timespec *abstime)
 {
-  struct _timeb curtime;
   int result;
   long timeout;
-  _ftime(&curtime);
-  timeout= ((long) (abstime->tv_sec - curtime.time)*1000L +
-		    (long)((abstime->tv_nsec/1000) - curtime.millitm)/1000L);
+  ulonglong curtime= my_getsystime();
+  timeout= (longlong)abstime->tv_sec*1000L + abstime->tv_nsec/1000000L -
+           curtime/10000L;
   if (timeout < 0)				/* Some safety */
     timeout = 0L;
   InterlockedIncrement(&cond->waiting);
Thread
bk commit into 4.1 tree (jimw:1.2458) BUG#14094Jim Winstead22 Oct