1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Change the name of the xShmClose VFS method to xShmUnmap, everywhere.

FossilOrigin-Name: c2d27cf51d33e6f38bab37008d39074051f75274
This commit is contained in:
drh
2010-07-14 00:14:30 +00:00
parent 6e1f482824
commit e11fedc589
10 changed files with 35 additions and 32 deletions

View File

@@ -106,7 +106,7 @@ int sqlite3OsShmLock(sqlite3_file *id, int offset, int n, int flags){
void sqlite3OsShmBarrier(sqlite3_file *id){
id->pMethods->xShmBarrier(id);
}
int sqlite3OsShmClose(sqlite3_file *id, int deleteFlag){
int sqlite3OsShmUnmap(sqlite3_file *id, int deleteFlag){
return id->pMethods->xShmUnmap(id, deleteFlag);
}
int sqlite3OsShmMap(

View File

@@ -250,7 +250,7 @@ int sqlite3OsDeviceCharacteristics(sqlite3_file *id);
int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);
int sqlite3OsShmLock(sqlite3_file *id, int, int, int);
void sqlite3OsShmBarrier(sqlite3_file *id);
int sqlite3OsShmClose(sqlite3_file *id, int);
int sqlite3OsShmUnmap(sqlite3_file *id, int);
/*
** Functions for accessing sqlite3_vfs methods

View File

@@ -3607,6 +3607,9 @@ static void unixShmBarrier(
/*
** Close a connection to shared-memory. Delete the underlying
** storage if deleteFlag is true.
**
** If there is no shared memory associated with the connection then this
** routine is a harmless no-op.
*/
static int unixShmUnmap(
sqlite3_file *fd, /* The underlying database file */

View File

@@ -1481,7 +1481,7 @@ shm_open_err:
** Close a connection to shared-memory. Delete the underlying
** storage if deleteFlag is true.
*/
static int winShmClose(
static int winShmUnmap(
sqlite3_file *fd, /* Database holding shared memory */
int deleteFlag /* Delete after closing if true */
){
@@ -1763,7 +1763,7 @@ shmpage_out:
# define winShmMap 0
# define winShmLock 0
# define winShmBarrier 0
# define winShmClose 0
# define winShmUnmap 0
#endif /* #ifndef SQLITE_OMIT_WAL */
/*
@@ -1793,7 +1793,7 @@ static const sqlite3_io_methods winIoMethod = {
winShmMap, /* xShmMap */
winShmLock, /* xShmLock */
winShmBarrier, /* xShmBarrier */
winShmClose /* xShmClose */
winShmUnmap /* xShmUnmap */
};
/****************************************************************************

View File

@@ -529,8 +529,8 @@ static int cfShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
static void cfShmBarrier(sqlite3_file *pFile){
sqlite3OsShmBarrier(((CrashFile*)pFile)->pRealFile);
}
static int cfShmClose(sqlite3_file *pFile, int delFlag){
return sqlite3OsShmClose(((CrashFile*)pFile)->pRealFile, delFlag);
static int cfShmUnmap(sqlite3_file *pFile, int delFlag){
return sqlite3OsShmUnmap(((CrashFile*)pFile)->pRealFile, delFlag);
}
static int cfShmMap(
sqlite3_file *pFile, /* Handle open on database file */
@@ -559,7 +559,7 @@ static const sqlite3_io_methods CrashFileVtab = {
cfShmMap, /* xShmMap */
cfShmLock, /* xShmLock */
cfShmBarrier, /* xShmBarrier */
cfShmClose /* xShmClose */
cfShmUnmap /* xShmUnmap */
};
/*

View File

@@ -53,7 +53,7 @@ static int devsymDeviceCharacteristics(sqlite3_file*);
static int devsymShmLock(sqlite3_file*,int,int,int);
static int devsymShmMap(sqlite3_file*,int,int,int, void volatile **);
static void devsymShmBarrier(sqlite3_file*);
static int devsymShmClose(sqlite3_file*,int);
static int devsymShmUnmap(sqlite3_file*,int);
/*
** Method declarations for devsym_vfs.
@@ -118,7 +118,7 @@ static sqlite3_io_methods devsym_io_methods = {
devsymShmMap, /* xShmMap */
devsymShmLock, /* xShmLock */
devsymShmBarrier, /* xShmBarrier */
devsymShmClose /* xShmClose */
devsymShmUnmap /* xShmUnmap */
};
struct DevsymGlobal {
@@ -253,9 +253,9 @@ static void devsymShmBarrier(sqlite3_file *pFile){
devsym_file *p = (devsym_file *)pFile;
sqlite3OsShmBarrier(p->pReal);
}
static int devsymShmClose(sqlite3_file *pFile, int delFlag){
static int devsymShmUnmap(sqlite3_file *pFile, int delFlag){
devsym_file *p = (devsym_file *)pFile;
return sqlite3OsShmClose(p->pReal, delFlag);
return sqlite3OsShmUnmap(p->pReal, delFlag);
}

View File

@@ -222,7 +222,7 @@ static sqlite3_io_methods fs_io_methods = {
0, /* xShmMap */
0, /* xShmLock */
0, /* xShmBarrier */
0 /* xShmClose */
0 /* xShmUnmap */
};
@@ -243,7 +243,7 @@ static sqlite3_io_methods tmp_io_methods = {
0, /* xShmMap */
0, /* xShmLock */
0, /* xShmBarrier */
0 /* xShmClose */
0 /* xShmUnmap */
};
/* Useful macros used in several places */

View File

@@ -1167,7 +1167,7 @@ recovery_error:
** Close an open wal-index.
*/
static void walIndexClose(Wal *pWal, int isDelete){
sqlite3OsShmClose(pWal->pDbFd, isDelete);
sqlite3OsShmUnmap(pWal->pDbFd, isDelete);
}
/*