mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Add the xShmRelease() method to the VFS. The os_unix.c implementation of
the shared memory logic is still non-functional. FossilOrigin-Name: ed715b47c5f7657fbf901805981867898054b14d
This commit is contained in:
40
manifest
40
manifest
@@ -1,5 +1,8 @@
|
|||||||
C Run\strans.test\sand\savtrans.test\sas\spart\sof\sthe\s"wal"\spermutation.
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
D 2010-04-27T06:49:34
|
Hash: SHA1
|
||||||
|
|
||||||
|
C Add\sthe\sxShmRelease()\smethod\sto\sthe\sVFS.\s\sThe\sos_unix.c\simplementation\sof\nthe\sshared\smemory\slogic\sis\sstill\snon-functional.
|
||||||
|
D 2010-04-27T11:49:27
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in d83a0ffef3dcbfb08b410a6c6dd6c009ec9167fb
|
F Makefile.in d83a0ffef3dcbfb08b410a6c6dd6c009ec9167fb
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -149,9 +152,9 @@ F src/notify.c cbfa66a836da3a51567209636e6a94059c137930
|
|||||||
F src/os.c 8bc63cf91e9802e2b807198e54e50227fa889306
|
F src/os.c 8bc63cf91e9802e2b807198e54e50227fa889306
|
||||||
F src/os.h 534b082c3cb349ad05fa6fa0b06087e022af282c
|
F src/os.h 534b082c3cb349ad05fa6fa0b06087e022af282c
|
||||||
F src/os_common.h 240c88b163b02c21a9f21f87d49678a0aa21ff30
|
F src/os_common.h 240c88b163b02c21a9f21f87d49678a0aa21ff30
|
||||||
F src/os_os2.c 082884dc2a20a2f1fddc404f3606ec2abe907b56
|
F src/os_os2.c 8ad77a418630d7dee91d1bb04f79c2096301d3a0
|
||||||
F src/os_unix.c 1acc854259b045cf029c6f95828a5f4b84f361c7
|
F src/os_unix.c 332ff9185aedcbd25568a06ddbdb51f5496b9756
|
||||||
F src/os_win.c 607b40e40662c6c74ff2400ff03e7f42521d5c75
|
F src/os_win.c a8fc01d8483be472e495793c01064fd87e56a5c1
|
||||||
F src/pager.c b4a41030860229e80295fa1f37addab24d21799c
|
F src/pager.c b4a41030860229e80295fa1f37addab24d21799c
|
||||||
F src/pager.h cee4487ab4f0911dd9f22a40e3cd55afdb7ef444
|
F src/pager.h cee4487ab4f0911dd9f22a40e3cd55afdb7ef444
|
||||||
F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
|
F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
|
||||||
@@ -166,7 +169,7 @@ F src/resolve.c ac5f1a713cd1ae77f08b83cc69581e11bf5ae6f9
|
|||||||
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
|
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
|
||||||
F src/select.c c03d8a0565febcde8c6a12c5d77d065fddae889b
|
F src/select.c c03d8a0565febcde8c6a12c5d77d065fddae889b
|
||||||
F src/shell.c c40427c7245535a04a9cb4a417b6cc05c022e6a4
|
F src/shell.c c40427c7245535a04a9cb4a417b6cc05c022e6a4
|
||||||
F src/sqlite.h.in 96b0bed7825da354119a9742a83033087c537133
|
F src/sqlite.h.in f9399ee58862fd146eff9725dda83b5c82d04a93
|
||||||
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
|
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
|
||||||
F src/sqliteInt.h 700a2df7b8dfe57c3b8d83c52ff40928e026220c
|
F src/sqliteInt.h 700a2df7b8dfe57c3b8d83c52ff40928e026220c
|
||||||
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
|
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
|
||||||
@@ -178,7 +181,7 @@ F src/test2.c b6b43413d495addd039a88b87d65c839f86b18cb
|
|||||||
F src/test3.c 4c21700c73a890a47fc685c1097bfb661346ac94
|
F src/test3.c 4c21700c73a890a47fc685c1097bfb661346ac94
|
||||||
F src/test4.c ad03bb987ddedce928f4258c1e7fa4109a73497d
|
F src/test4.c ad03bb987ddedce928f4258c1e7fa4109a73497d
|
||||||
F src/test5.c cc55900118fa4add8ec9cf69fc4225a4662f76b1
|
F src/test5.c cc55900118fa4add8ec9cf69fc4225a4662f76b1
|
||||||
F src/test6.c d23fc84954751735bcb1050d4606b00952eb7809
|
F src/test6.c 49b39daf8e88ed6baab25c524ca5635304f6f315
|
||||||
F src/test7.c 3f2d63e4ccf97f8c2cf1a7fa0a3c8e2e2a354e6e
|
F src/test7.c 3f2d63e4ccf97f8c2cf1a7fa0a3c8e2e2a354e6e
|
||||||
F src/test8.c f959db9a22d882013b64c92753fa793b2ce3bdea
|
F src/test8.c f959db9a22d882013b64c92753fa793b2ce3bdea
|
||||||
F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
|
F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
|
||||||
@@ -187,19 +190,19 @@ F src/test_autoext.c 30e7bd98ab6d70a62bb9ba572e4c7df347fe645e
|
|||||||
F src/test_backup.c c129c91127e9b46e335715ae2e75756e25ba27de
|
F src/test_backup.c c129c91127e9b46e335715ae2e75756e25ba27de
|
||||||
F src/test_btree.c 47cd771250f09cdc6e12dda5bc71bc0b3abc96e2
|
F src/test_btree.c 47cd771250f09cdc6e12dda5bc71bc0b3abc96e2
|
||||||
F src/test_config.c 8c408fbffbe8082d1d3dc55044ddfd5580f3c9b9
|
F src/test_config.c 8c408fbffbe8082d1d3dc55044ddfd5580f3c9b9
|
||||||
F src/test_demovfs.c 68f8e6cfd6b337612e26b7027f97bf7ea02d4e04
|
F src/test_demovfs.c da81a5f7785bb352bda7911c332a983ec4f17f27
|
||||||
F src/test_devsym.c 76f47435769168fb665828f5cc24a4a0a130c302
|
F src/test_devsym.c 361d069bf74d4044bf53eb29dc0fa3709ed98baf
|
||||||
F src/test_func.c 13b582345fb1185a93e46c53310fae8547dcce20
|
F src/test_func.c 13b582345fb1185a93e46c53310fae8547dcce20
|
||||||
F src/test_hexio.c 1237f000ec7a491009b1233f5c626ea71bce1ea2
|
F src/test_hexio.c 1237f000ec7a491009b1233f5c626ea71bce1ea2
|
||||||
F src/test_init.c 5d624ffd0409d424cf9adbfe1f056b200270077c
|
F src/test_init.c 5d624ffd0409d424cf9adbfe1f056b200270077c
|
||||||
F src/test_intarray.c d879bbf8e4ce085ab966d1f3c896a7c8b4f5fc99
|
F src/test_intarray.c d879bbf8e4ce085ab966d1f3c896a7c8b4f5fc99
|
||||||
F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
|
F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
|
||||||
F src/test_journal.c 6f2db1b847929791242e32323721c48c7d2d6e0c
|
F src/test_journal.c 0537fcf9d4ecb394ec8b27d887a004ecaab85f16
|
||||||
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
|
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
|
||||||
F src/test_malloc.c 2842c922b8e8d992aba722214952204ca025b411
|
F src/test_malloc.c 2842c922b8e8d992aba722214952204ca025b411
|
||||||
F src/test_mutex.c ce06b59aca168cd8c520b77159a24352a7469bd3
|
F src/test_mutex.c ce06b59aca168cd8c520b77159a24352a7469bd3
|
||||||
F src/test_onefile.c 1d098e7446d89087def7d20e0cdb77a0713ed1bf
|
F src/test_onefile.c 1d098e7446d89087def7d20e0cdb77a0713ed1bf
|
||||||
F src/test_osinst.c 79a9b9fdb87fccd7fdc2f523bfbb91f964bafa68
|
F src/test_osinst.c f5d1a4ee8b80fc58d1430c56146de748584013a9
|
||||||
F src/test_pcache.c 7bf828972ac0d2403f5cfa4cd14da41f8ebe73d8
|
F src/test_pcache.c 7bf828972ac0d2403f5cfa4cd14da41f8ebe73d8
|
||||||
F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0
|
F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0
|
||||||
F src/test_server.c bbba05c144b5fc4b52ff650a4328027b3fa5fcc6
|
F src/test_server.c bbba05c144b5fc4b52ff650a4328027b3fa5fcc6
|
||||||
@@ -808,7 +811,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P b51a5f8bc660616aa264025dd7ad4bdab458814b
|
P c8893310510148f7e71ede5691606b6fc1c3df4d
|
||||||
R 25f06e3e98c7ea6b1eb255e6fd74be59
|
R fb13be4dd0d753be93180ef3cbf1d215
|
||||||
U dan
|
U drh
|
||||||
Z 9cceaabbad6baa9da4fc7d1b5b1a7fe5
|
Z 6f72fe2227e763bb3a1c4d06bd5a901c
|
||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||||
|
|
||||||
|
iD8DBQFL1s9KoxKgR168RlERAqqPAJ0SGEtAEImz4CyMiguEDpkB2AslLQCfd9o1
|
||||||
|
tWw2lhvU6jis7pTQTOVY1gE=
|
||||||
|
=4LgW
|
||||||
|
-----END PGP SIGNATURE-----
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
c8893310510148f7e71ede5691606b6fc1c3df4d
|
ed715b47c5f7657fbf901805981867898054b14d
|
||||||
11
src/os_os2.c
11
src/os_os2.c
@@ -1111,16 +1111,7 @@ int sqlite3_os_init(void){
|
|||||||
os2Randomness, /* xRandomness */
|
os2Randomness, /* xRandomness */
|
||||||
os2Sleep, /* xSleep */
|
os2Sleep, /* xSleep */
|
||||||
os2CurrentTime, /* xCurrentTime */
|
os2CurrentTime, /* xCurrentTime */
|
||||||
os2GetLastError /* xGetLastError */
|
os2GetLastError, /* xGetLastError */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0, /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
sqlite3_vfs_register(&os2Vfs, 1);
|
sqlite3_vfs_register(&os2Vfs, 1);
|
||||||
initUconvObjects();
|
initUconvObjects();
|
||||||
|
|||||||
@@ -4647,8 +4647,13 @@ shm_open_err:
|
|||||||
** Query and/or changes the size of a shared-memory segment.
|
** Query and/or changes the size of a shared-memory segment.
|
||||||
** The reqSize parameter is the new size of the segment, or -1 to
|
** The reqSize parameter is the new size of the segment, or -1 to
|
||||||
** do just a query. The size of the segment after resizing is
|
** do just a query. The size of the segment after resizing is
|
||||||
** written into pNewSize. The start of the shared memory buffer
|
** written into pNewSize. A writer lock is held on the shared memory
|
||||||
** is stored in **ppBuffer.
|
** segment while resizing it.
|
||||||
|
**
|
||||||
|
** If ppBuffer is not NULL, the a reader lock is acquired no the shared
|
||||||
|
** memory segment and *ppBuffer is made to point to the start of the
|
||||||
|
** shared memory segment. xShmRelease() must be called to release the
|
||||||
|
** lock.
|
||||||
*/
|
*/
|
||||||
static int unixShmSize(
|
static int unixShmSize(
|
||||||
sqlite3_shm *pSharedMem, /* Pointer returned by unixShmOpen() */
|
sqlite3_shm *pSharedMem, /* Pointer returned by unixShmOpen() */
|
||||||
@@ -4679,6 +4684,14 @@ static int unixShmSize(
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Release the lock held on the shared memory segment to that other
|
||||||
|
** threads are free to resize it if necessary.
|
||||||
|
*/
|
||||||
|
static int unixShmRelease(sqlite3_shm *pSharedMem){
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Create or release a lock on shared memory.
|
** Create or release a lock on shared memory.
|
||||||
*/
|
*/
|
||||||
@@ -5934,6 +5947,7 @@ int sqlite3_os_init(void){
|
|||||||
unixGetLastError, /* xGetLastError */ \
|
unixGetLastError, /* xGetLastError */ \
|
||||||
unixShmOpen, /* xShmOpen */ \
|
unixShmOpen, /* xShmOpen */ \
|
||||||
unixShmSize, /* xShmSize */ \
|
unixShmSize, /* xShmSize */ \
|
||||||
|
unixShmRelease, /* xShmRelease */ \
|
||||||
0, /* xShmPush */ \
|
0, /* xShmPush */ \
|
||||||
0, /* xShmPull */ \
|
0, /* xShmPull */ \
|
||||||
unixShmLock, /* xShmLock */ \
|
unixShmLock, /* xShmLock */ \
|
||||||
|
|||||||
11
src/os_win.c
11
src/os_win.c
@@ -1912,16 +1912,7 @@ int sqlite3_os_init(void){
|
|||||||
winRandomness, /* xRandomness */
|
winRandomness, /* xRandomness */
|
||||||
winSleep, /* xSleep */
|
winSleep, /* xSleep */
|
||||||
winCurrentTime, /* xCurrentTime */
|
winCurrentTime, /* xCurrentTime */
|
||||||
winGetLastError /* xGetLastError */
|
winGetLastError, /* xGetLastError */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0, /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sqlite3_vfs_register(&winVfs, 1);
|
sqlite3_vfs_register(&winVfs, 1);
|
||||||
|
|||||||
@@ -844,7 +844,8 @@ struct sqlite3_vfs {
|
|||||||
** definition. Those that follow are added in version 2 or later
|
** definition. Those that follow are added in version 2 or later
|
||||||
*/
|
*/
|
||||||
int (*xShmOpen)(sqlite3_vfs*, const char *zName, sqlite3_shm**);
|
int (*xShmOpen)(sqlite3_vfs*, const char *zName, sqlite3_shm**);
|
||||||
int (*xShmSize)(sqlite3_shm*, int reqSize, int *pNewSize, char **);
|
int (*xShmSize)(sqlite3_shm*, int reqSize, int *pNewSize, char**);
|
||||||
|
int (*xShmRelease)(sqlite3_shm*);
|
||||||
int (*xShmPush)(sqlite3_shm*);
|
int (*xShmPush)(sqlite3_shm*);
|
||||||
int (*xShmPull)(sqlite3_shm*);
|
int (*xShmPull)(sqlite3_shm*);
|
||||||
int (*xShmLock)(sqlite3_shm*, int lockType, int ofst, int nByte);
|
int (*xShmLock)(sqlite3_shm*, int lockType, int ofst, int nByte);
|
||||||
|
|||||||
@@ -782,15 +782,6 @@ static int crashEnableCmd(
|
|||||||
cfRandomness, /* xRandomness */
|
cfRandomness, /* xRandomness */
|
||||||
cfSleep, /* xSleep */
|
cfSleep, /* xSleep */
|
||||||
cfCurrentTime, /* xCurrentTime */
|
cfCurrentTime, /* xCurrentTime */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0 /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if( objc!=2 ){
|
if( objc!=2 ){
|
||||||
|
|||||||
@@ -624,15 +624,6 @@ sqlite3_vfs *sqlite3_demovfs(void){
|
|||||||
demoRandomness, /* xRandomness */
|
demoRandomness, /* xRandomness */
|
||||||
demoSleep, /* xSleep */
|
demoSleep, /* xSleep */
|
||||||
demoCurrentTime, /* xCurrentTime */
|
demoCurrentTime, /* xCurrentTime */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0 /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
return &demovfs;
|
return &demovfs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,15 +93,6 @@ static sqlite3_vfs devsym_vfs = {
|
|||||||
devsymRandomness, /* xRandomness */
|
devsymRandomness, /* xRandomness */
|
||||||
devsymSleep, /* xSleep */
|
devsymSleep, /* xSleep */
|
||||||
devsymCurrentTime, /* xCurrentTime */
|
devsymCurrentTime, /* xCurrentTime */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0 /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static sqlite3_io_methods devsym_io_methods = {
|
static sqlite3_io_methods devsym_io_methods = {
|
||||||
|
|||||||
@@ -180,15 +180,6 @@ static sqlite3_vfs jt_vfs = {
|
|||||||
jtRandomness, /* xRandomness */
|
jtRandomness, /* xRandomness */
|
||||||
jtSleep, /* xSleep */
|
jtSleep, /* xSleep */
|
||||||
jtCurrentTime, /* xCurrentTime */
|
jtCurrentTime, /* xCurrentTime */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0 /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static sqlite3_io_methods jt_io_methods = {
|
static sqlite3_io_methods jt_io_methods = {
|
||||||
|
|||||||
@@ -204,15 +204,6 @@ static sqlite3_vfs inst_vfs = {
|
|||||||
instRandomness, /* xRandomness */
|
instRandomness, /* xRandomness */
|
||||||
instSleep, /* xSleep */
|
instSleep, /* xSleep */
|
||||||
instCurrentTime, /* xCurrentTime */
|
instCurrentTime, /* xCurrentTime */
|
||||||
0, /* xShmOpen */
|
|
||||||
0, /* xShmSize */
|
|
||||||
0, /* xShmPush */
|
|
||||||
0, /* xShmPull */
|
|
||||||
0, /* xShmLock */
|
|
||||||
0, /* xShmClose */
|
|
||||||
0, /* xShmDelete */
|
|
||||||
0, /* xRename */
|
|
||||||
0 /* xCurrentTimeInt64 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static sqlite3_io_methods inst_io_methods = {
|
static sqlite3_io_methods inst_io_methods = {
|
||||||
|
|||||||
Reference in New Issue
Block a user