/ Check-in [b27f022f]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Get main.c to compile when HAVE_USLEEP is 0. (CVS 4245)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b27f022fb924709f1c5e4642d5d59cab942e826d
User & Date: drh 2007-08-20 11:12:41
Context
2007-08-20
13:14
Bug fix in BTree shared cache locking code. (CVS 4246) check-in: 399d3e75 user: drh tags: trunk
11:12
Get main.c to compile when HAVE_USLEEP is 0. (CVS 4245) check-in: b27f022f user: drh tags: trunk
06:44
Update the locking-style code in os_unix.c. The updates are as yet untested. (CVS 4244) check-in: 41f2175b user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.385 2007/08/18 10:59:20 danielk1977 Exp $
           17  +** $Id: main.c,v 1.386 2007/08/20 11:12:41 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <ctype.h>
    22     22   
    23     23   /*
    24     24   ** The version of the library
................................................................................
   319    319     if( prior + delay > timeout ){
   320    320       delay = timeout - prior;
   321    321       if( delay<=0 ) return 0;
   322    322     }
   323    323     sqlite3OsSleep(db->pVfs, delay);
   324    324     return 1;
   325    325   #else
          326  +  sqlite3 *db = (sqlite3 *)ptr;
   326    327     int timeout = ((sqlite3 *)ptr)->busyTimeout;
   327    328     if( (count+1)*1000 > timeout ){
   328    329       return 0;
   329    330     }
   330         -  sqlite3OsSleep(1000);
          331  +  sqlite3OsSleep(db->pVfs, 1000000);
   331    332     return 1;
   332    333   #endif
   333    334   }
   334    335   
   335    336   /*
   336    337   ** Invoke the given busy handler.
   337    338   **