/ Check-in [69e07fdb]
Login

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

Overview
Comment:Remove the xShmPush and xShmPull methods from the VFS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wal
Files: files | file ages | folders
SHA1: 69e07fdbde5054593de948b76dfac157cf5d4058
User & Date: drh 2010-05-01 18:23:09
Context
2010-05-01
20:17
Change the SHM interface so that it does not take the name of the shared object but rather the name of the WAL file and derives its own name from that. Remove the xShmDelete method from the VFS and replace it with a delete flag on xShmClose. check-in: 94dea5f9 user: drh tags: wal
18:23
Remove the xShmPush and xShmPull methods from the VFS. check-in: 69e07fdb user: drh tags: wal
17:57
Define an invariant to guarantee deadlock-free operation of SHM in os_unix.c and check that invariant with assert() statements. check-in: 6af2dca7 user: drh tags: wal
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
    unixSleep,            /* xSleep */                      \
    unixCurrentTime,      /* xCurrentTime */                \
    unixGetLastError,     /* xGetLastError */               \
    unixShmOpen,          /* xShmOpen */                    \
    unixShmSize,          /* xShmSize */                    \
    unixShmGet,           /* xShmGet */                     \
    unixShmRelease,       /* xShmRelease */                 \
    0,                    /* xShmPush */                    \
    0,                    /* xShmPull */                    \
    unixShmLock,          /* xShmLock */                    \
    unixShmClose,         /* xShmClose */                   \
    unixShmDelete,        /* xShmDelete */                  \
    0,                    /* xRename */                     \
    0,                    /* xCurrentTimeInt64 */           \
  }








<
<







6583
6584
6585
6586
6587
6588
6589


6590
6591
6592
6593
6594
6595
6596
    unixSleep,            /* xSleep */                      \
    unixCurrentTime,      /* xCurrentTime */                \
    unixGetLastError,     /* xGetLastError */               \
    unixShmOpen,          /* xShmOpen */                    \
    unixShmSize,          /* xShmSize */                    \
    unixShmGet,           /* xShmGet */                     \
    unixShmRelease,       /* xShmRelease */                 \


    unixShmLock,          /* xShmLock */                    \
    unixShmClose,         /* xShmClose */                   \
    unixShmDelete,        /* xShmDelete */                  \
    0,                    /* xRename */                     \
    0,                    /* xCurrentTimeInt64 */           \
  }

Changes to src/sqlite.h.in.

843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
  ** The methods above are in version 1 of the sqlite_vfs object
  ** definition.  Those that follow are added in version 2 or later
  */
  int (*xShmOpen)(sqlite3_vfs*, const char *zName, sqlite3_shm**);
  int (*xShmSize)(sqlite3_shm*, int reqSize, int *pNewSize);
  int (*xShmGet)(sqlite3_shm*, int reqMapSize, int *pMapSize, void**);
  int (*xShmRelease)(sqlite3_shm*);
  int (*xShmPush)(sqlite3_shm*);
  int (*xShmPull)(sqlite3_shm*);
  int (*xShmLock)(sqlite3_shm*, int desiredLock, int *gotLock);
  int (*xShmClose)(sqlite3_shm*);
  int (*xShmDelete)(sqlite3_vfs*, const char *zName);
  int (*xRename)(sqlite3_vfs*, const char *zOld, const char *zNew, int dirSync);
  int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
  /*
  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.







<
<







843
844
845
846
847
848
849


850
851
852
853
854
855
856
  ** The methods above are in version 1 of the sqlite_vfs object
  ** definition.  Those that follow are added in version 2 or later
  */
  int (*xShmOpen)(sqlite3_vfs*, const char *zName, sqlite3_shm**);
  int (*xShmSize)(sqlite3_shm*, int reqSize, int *pNewSize);
  int (*xShmGet)(sqlite3_shm*, int reqMapSize, int *pMapSize, void**);
  int (*xShmRelease)(sqlite3_shm*);


  int (*xShmLock)(sqlite3_shm*, int desiredLock, int *gotLock);
  int (*xShmClose)(sqlite3_shm*);
  int (*xShmDelete)(sqlite3_vfs*, const char *zName);
  int (*xRename)(sqlite3_vfs*, const char *zOld, const char *zNew, int dirSync);
  int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
  /*
  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.

Changes to src/test_onefile.c.

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
    fsDlSym,                                    /* xDlSym */
    fsDlClose,                                  /* xDlClose */
    fsRandomness,                               /* xRandomness */
    fsSleep,                                    /* xSleep */
    fsCurrentTime,                              /* xCurrentTime */
    0,                                          /* xShmOpen */
    0,                                          /* xShmSize */
    0,                                          /* xShmPush */
    0,                                          /* xShmPull */
    0,                                          /* xShmLock */
    0,                                          /* xShmClose */
    0,                                          /* xShmDelete */
    0,                                          /* xRename */
    0                                           /* xCurrentTimeInt64 */
  }, 
  0,                                            /* pFileList */







<
<







197
198
199
200
201
202
203


204
205
206
207
208
209
210
    fsDlSym,                                    /* xDlSym */
    fsDlClose,                                  /* xDlClose */
    fsRandomness,                               /* xRandomness */
    fsSleep,                                    /* xSleep */
    fsCurrentTime,                              /* xCurrentTime */
    0,                                          /* xShmOpen */
    0,                                          /* xShmSize */


    0,                                          /* xShmLock */
    0,                                          /* xShmClose */
    0,                                          /* xShmDelete */
    0,                                          /* xRename */
    0                                           /* xCurrentTimeInt64 */
  }, 
  0,                                            /* pFileList */