1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

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.

FossilOrigin-Name: 94dea5f9c11a68564220cec76ac3fae2ba90e907
This commit is contained in:
drh
2010-05-01 20:17:30 +00:00
parent f72a8751c9
commit 2d536e187f
6 changed files with 60 additions and 62 deletions

View File

@@ -73,8 +73,7 @@ static int devsymShmSize(sqlite3_shm *, int , int *);
static int devsymShmGet(sqlite3_shm *, int , int *, void **);
static int devsymShmRelease(sqlite3_shm *);
static int devsymShmLock(sqlite3_shm *, int , int *);
static int devsymShmClose(sqlite3_shm *);
static int devsymShmDelete(sqlite3_vfs *, const char *);
static int devsymShmClose(sqlite3_shm *, int);
static sqlite3_vfs devsym_vfs = {
2, /* iVersion */
@@ -110,7 +109,6 @@ static sqlite3_vfs devsym_vfs = {
0,
devsymShmLock,
devsymShmClose,
devsymShmDelete,
0,
0,
};
@@ -378,11 +376,8 @@ static int devsymShmRelease(sqlite3_shm *p){
static int devsymShmLock(sqlite3_shm *p, int desiredLock, int *gotLock){
return g.pVfs->xShmLock(p, desiredLock, gotLock);
}
static int devsymShmClose(sqlite3_shm *p){
return g.pVfs->xShmClose(p);
}
static int devsymShmDelete(sqlite3_vfs *pVfs, const char *zName){
return g.pVfs->xShmDelete(g.pVfs, zName);
static int devsymShmClose(sqlite3_shm *p, int deleteFlag){
return g.pVfs->xShmClose(p, deleteFlag);
}
/*
@@ -400,7 +395,6 @@ void devsym_register(int iDeviceChar, int iSectorSize){
devsym_vfs.xShmRelease = (g.pVfs->xShmRelease ? devsymShmRelease : 0);
devsym_vfs.xShmLock = (g.pVfs->xShmLock ? devsymShmLock : 0);
devsym_vfs.xShmClose = (g.pVfs->xShmClose ? devsymShmClose : 0);
devsym_vfs.xShmDelete = (g.pVfs->xShmDelete ? devsymShmDelete : 0);
sqlite3_vfs_register(&devsym_vfs, 0);
}
if( iDeviceChar>=0 ){