/ Check-in [bb18f578]
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:The iInUseDB and iInUseMM variables do not need to be volatile.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | branch-3.5.9
Files: files | file ages | folders
SHA1: bb18f5785283e1067338b6b85098e8f2ff3b093a
User & Date: drh 2010-01-30 23:08:24
Context
2010-01-30
23:08
The iInUseDB and iInUseMM variables do not need to be volatile. Leaf check-in: bb18f578 user: drh tags: branch-3.5.9
22:28
Always hold the MEM2 mutex when initially marking a pager as in use by its database connection. check-in: 622c1717 user: drh tags: branch-3.5.9
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

   397    397     void *pCodecArg;            /* First argument to xCodec() */
   398    398   #endif
   399    399     int nHash;                  /* Size of the pager hash table */
   400    400     PgHdr **aHash;              /* Hash table to map page number to PgHdr */
   401    401   #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
   402    402     Pager *pNext;               /* Doubly linked list of pagers on which */
   403    403     Pager *pPrev;               /* sqlite3_release_memory() will work */
   404         -  volatile int iInUseMM;      /* Non-zero if unavailable to MM */
   405         -  volatile int iInUseDB;      /* Non-zero if in sqlite3_release_memory() */
          404  +  int iInUseDB;               /* Non-zero if in sqlite3_release_memory() */
          405  +  u8 iInUseMM;                /* Non-zero if unavailable to MM */
   406    406     u8 onPagerList;             /* True if part of the sqlite3PagerList */
   407    407   #endif
   408    408     char *pTmpSpace;            /* Pager.pageSize bytes of space for tmp use */
   409    409     char dbFileVers[16];        /* Changes whenever database file changes */
   410    410   };
   411    411   
   412    412   /*