/ Check-in [6336de7a]
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:Tweaks to the new shared-memory interface design - mostly comment changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: 6336de7aa96a6e1e68cc123e5d5f485d790d95a2
User & Date: drh 2010-07-13 23:41:40
Context
2010-07-14
00:14
Change the name of the xShmClose VFS method to xShmUnmap, everywhere. Closed-Leaf check-in: c2d27cf5 user: drh tags: experimental
2010-07-13
23:41
Tweaks to the new shared-memory interface design - mostly comment changes. check-in: 6336de7a user: drh tags: experimental
18:45
Fix a typo in a comment in sqlite.h.in. check-in: 4a6c4b66 user: dan tags: experimental
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/journal.c.

   179    179     jrnlFileSize,  /* xFileSize */
   180    180     0,             /* xLock */
   181    181     0,             /* xUnlock */
   182    182     0,             /* xCheckReservedLock */
   183    183     0,             /* xFileControl */
   184    184     0,             /* xSectorSize */
   185    185     0,             /* xDeviceCharacteristics */
   186         -  0,             /* xShmOpen */
          186  +  0,             /* xShmMap */
   187    187     0,             /* xShmLock */
   188         -  0,             /* xShmMap */
   189    188     0,             /* xShmBarrier */
   190         -  0              /* xShmClose */
          189  +  0              /* xShmUnmap */
   191    190   };
   192    191   
   193    192   /* 
   194    193   ** Open a journal file.
   195    194   */
   196    195   int sqlite3JournalOpen(
   197    196     sqlite3_vfs *pVfs,         /* The VFS to use for actual file I/O */

Changes to src/memjournal.c.

   223    223     memjrnlFileSize,  /* xFileSize */
   224    224     0,                /* xLock */
   225    225     0,                /* xUnlock */
   226    226     0,                /* xCheckReservedLock */
   227    227     0,                /* xFileControl */
   228    228     0,                /* xSectorSize */
   229    229     0,                /* xDeviceCharacteristics */
   230         -  0,                /* xShmOpen */
          230  +  0,                /* xShmMap */
   231    231     0,                /* xShmLock */
   232         -  0,                /* xShmMap */
   233    232     0,                /* xShmBarrier */
   234         -  0                 /* xShmClose */
          233  +  0                 /* xShmUnlock */
   235    234   };
   236    235   
   237    236   /* 
   238    237   ** Open a journal file.
   239    238   */
   240    239   void sqlite3MemJournalOpen(sqlite3_file *pJfd){
   241    240     MemJournal *p = (MemJournal *)pJfd;

Changes to src/os_unix.c.

  3729   3729   ** Here are all of the sqlite3_io_methods objects for each of the
  3730   3730   ** locking strategies.  Functions that return pointers to these methods
  3731   3731   ** are also created.
  3732   3732   */
  3733   3733   IOMETHODS(
  3734   3734     posixIoFinder,            /* Finder function name */
  3735   3735     posixIoMethods,           /* sqlite3_io_methods object name */
  3736         -  2,                        /* ShmOpen is enabled */
         3736  +  2,                        /* shared memory is enabled */
  3737   3737     unixClose,                /* xClose method */
  3738   3738     unixLock,                 /* xLock method */
  3739   3739     unixUnlock,               /* xUnlock method */
  3740   3740     unixCheckReservedLock     /* xCheckReservedLock method */
  3741   3741   )
  3742   3742   IOMETHODS(
  3743   3743     nolockIoFinder,           /* Finder function name */
  3744   3744     nolockIoMethods,          /* sqlite3_io_methods object name */
  3745         -  1,                        /* ShmOpen is disabled */
         3745  +  1,                        /* shared memory is disabled */
  3746   3746     nolockClose,              /* xClose method */
  3747   3747     nolockLock,               /* xLock method */
  3748   3748     nolockUnlock,             /* xUnlock method */
  3749   3749     nolockCheckReservedLock   /* xCheckReservedLock method */
  3750   3750   )
  3751   3751   IOMETHODS(
  3752   3752     dotlockIoFinder,          /* Finder function name */
  3753   3753     dotlockIoMethods,         /* sqlite3_io_methods object name */
  3754         -  1,                        /* ShmOpen is disabled */
         3754  +  1,                        /* shared memory is disabled */
  3755   3755     dotlockClose,             /* xClose method */
  3756   3756     dotlockLock,              /* xLock method */
  3757   3757     dotlockUnlock,            /* xUnlock method */
  3758   3758     dotlockCheckReservedLock  /* xCheckReservedLock method */
  3759   3759   )
  3760   3760   
  3761   3761   #if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
  3762   3762   IOMETHODS(
  3763   3763     flockIoFinder,            /* Finder function name */
  3764   3764     flockIoMethods,           /* sqlite3_io_methods object name */
  3765         -  1,                        /* ShmOpen is disabled */
         3765  +  1,                        /* shared memory is disabled */
  3766   3766     flockClose,               /* xClose method */
  3767   3767     flockLock,                /* xLock method */
  3768   3768     flockUnlock,              /* xUnlock method */
  3769   3769     flockCheckReservedLock    /* xCheckReservedLock method */
  3770   3770   )
  3771   3771   #endif
  3772   3772   
  3773   3773   #if OS_VXWORKS
  3774   3774   IOMETHODS(
  3775   3775     semIoFinder,              /* Finder function name */
  3776   3776     semIoMethods,             /* sqlite3_io_methods object name */
  3777         -  1,                        /* ShmOpen is disabled */
         3777  +  1,                        /* shared memory is disabled */
  3778   3778     semClose,                 /* xClose method */
  3779   3779     semLock,                  /* xLock method */
  3780   3780     semUnlock,                /* xUnlock method */
  3781   3781     semCheckReservedLock      /* xCheckReservedLock method */
  3782   3782   )
  3783   3783   #endif
  3784   3784   
  3785   3785   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  3786   3786   IOMETHODS(
  3787   3787     afpIoFinder,              /* Finder function name */
  3788   3788     afpIoMethods,             /* sqlite3_io_methods object name */
  3789         -  1,                        /* ShmOpen is disabled */
         3789  +  1,                        /* shared memory is disabled */
  3790   3790     afpClose,                 /* xClose method */
  3791   3791     afpLock,                  /* xLock method */
  3792   3792     afpUnlock,                /* xUnlock method */
  3793   3793     afpCheckReservedLock      /* xCheckReservedLock method */
  3794   3794   )
  3795   3795   #endif
  3796   3796   
................................................................................
  3807   3807   static int proxyClose(sqlite3_file*);
  3808   3808   static int proxyLock(sqlite3_file*, int);
  3809   3809   static int proxyUnlock(sqlite3_file*, int);
  3810   3810   static int proxyCheckReservedLock(sqlite3_file*, int*);
  3811   3811   IOMETHODS(
  3812   3812     proxyIoFinder,            /* Finder function name */
  3813   3813     proxyIoMethods,           /* sqlite3_io_methods object name */
  3814         -  1,                        /* ShmOpen is disabled */
         3814  +  1,                        /* shared memory is disabled */
  3815   3815     proxyClose,               /* xClose method */
  3816   3816     proxyLock,                /* xLock method */
  3817   3817     proxyUnlock,              /* xUnlock method */
  3818   3818     proxyCheckReservedLock    /* xCheckReservedLock method */
  3819   3819   )
  3820   3820   #endif
  3821   3821   
  3822   3822   /* nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set */
  3823   3823   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  3824   3824   IOMETHODS(
  3825   3825     nfsIoFinder,               /* Finder function name */
  3826   3826     nfsIoMethods,              /* sqlite3_io_methods object name */
  3827         -  1,                         /* ShmOpen is disabled */
         3827  +  1,                         /* shared memory is disabled */
  3828   3828     unixClose,                 /* xClose method */
  3829   3829     unixLock,                  /* xLock method */
  3830   3830     nfsUnlock,                 /* xUnlock method */
  3831   3831     unixCheckReservedLock      /* xCheckReservedLock method */
  3832   3832   )
  3833   3833   #endif
  3834   3834   

Changes to src/vdbe.c.

  5209   5209     if( eNew==PAGER_JOURNALMODE_QUERY ) eNew = eOld;
  5210   5210     if( !sqlite3PagerOkToChangeJournalMode(pPager) ) eNew = eOld;
  5211   5211   
  5212   5212   #ifndef SQLITE_OMIT_WAL
  5213   5213     zFilename = sqlite3PagerFilename(pPager);
  5214   5214   
  5215   5215     /* Do not allow a transition to journal_mode=WAL for a database
  5216         -  ** in temporary storage or if the VFS does not support xShmOpen.
         5216  +  ** in temporary storage or if the VFS does not support shared memory 
  5217   5217     */
  5218   5218     if( eNew==PAGER_JOURNALMODE_WAL
  5219   5219      && (zFilename[0]==0                         /* Temp file */
  5220         -       || !sqlite3PagerWalSupported(pPager))   /* No xShmOpen support */
         5220  +       || !sqlite3PagerWalSupported(pPager))   /* No shared-memory support */
  5221   5221     ){
  5222   5222       eNew = eOld;
  5223   5223     }
  5224   5224   
  5225   5225     if( (eNew!=eOld)
  5226   5226      && (eOld==PAGER_JOURNALMODE_WAL || eNew==PAGER_JOURNALMODE_WAL)
  5227   5227     ){