mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
When recycling a page, try to find one that does not require a call to xSync() on the journal file. Also simplify some of the mutex related things in pcache. (CVS 5597)
FossilOrigin-Name: 93dbc5427bebaa0b3d726731027caad3f70611c7
This commit is contained in:
19
src/pcache.h
19
src/pcache.h
@@ -12,7 +12,7 @@
|
||||
** This header file defines the interface that the sqlite page cache
|
||||
** subsystem.
|
||||
**
|
||||
** @(#) $Id: pcache.h,v 1.3 2008/08/21 20:21:35 drh Exp $
|
||||
** @(#) $Id: pcache.h,v 1.4 2008/08/22 16:22:17 danielk1977 Exp $
|
||||
*/
|
||||
|
||||
#ifndef _PCACHE_H_
|
||||
@@ -70,13 +70,13 @@ void sqlite3PCacheFree(void*);
|
||||
** Only clean and unpinned pages can be reclaimed.
|
||||
*/
|
||||
void sqlite3PcacheOpen(
|
||||
int szPage, /* Size of every page */
|
||||
int szExtra, /* Extra space associated with each page */
|
||||
int bPurgeable, /* True if pages are on backing store */
|
||||
void (*xDestroy)(PgHdr *), /* Called to destroy a page */
|
||||
int (*xStress)(void*), /* Call to try to make pages clean */
|
||||
void *pStress, /* Argument to xStress */
|
||||
PCache *pToInit /* Preallocated space for the PCache */
|
||||
int szPage, /* Size of every page */
|
||||
int szExtra, /* Extra space associated with each page */
|
||||
int bPurgeable, /* True if pages are on backing store */
|
||||
void (*xDestroy)(PgHdr *), /* Called to destroy a page */
|
||||
int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */
|
||||
void *pStress, /* Argument to xStress */
|
||||
PCache *pToInit /* Preallocated space for the PCache */
|
||||
);
|
||||
|
||||
/* Modify the page-size after the cache has been created. */
|
||||
@@ -118,9 +118,6 @@ void sqlite3PcacheRollback(PCache*, int); /* Rollback to preserved copy */
|
||||
/* Get a list of all dirty pages in the cache, sorted by page number */
|
||||
PgHdr *sqlite3PcacheDirtyList(PCache*);
|
||||
|
||||
/* Query the cache for a dirty page with a zero ref-count */
|
||||
PgHdr *sqlite3PcacheDirtyPage(PCache *);
|
||||
|
||||
/* Reset and close the cache object */
|
||||
void sqlite3PcacheClose(PCache*);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user