Beispiel #1
0
        /******************************************************************************/
        /******** sqlite3_pcache Methods **********************************************/

        /*
        ** Implementation of the sqlite3_pcache.xInit method.
        */
        static int pcache1Init(object NotUsed)
        {
            UNUSED_PARAMETER(NotUsed);
            Debug.Assert(pcache1.isInit == 0);
            pcache1 = new PCacheGlobal();// memset( &pcache1, 0, sizeof( pcache1 ) );
            if (sqlite3GlobalConfig.bCoreMutex)
            {
                pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
            }
            pcache1.isInit = 1;
            return(SQLITE_OK);
        }
Beispiel #2
0
        /******************************************************************************/
        /******** sqlite3_pcache Methods **********************************************/

        /*
        ** Implementation of the sqlite3_pcache.xInit method.
        */
        static int pcache1Init <T>(T NotUsed)
        {
            UNUSED_PARAMETER(NotUsed);
            Debug.Assert(pcache1.isInit == false);
            pcache1 = new PCacheGlobal();//memset(&pcache1, 0, sizeof(pcache1));
            if (sqlite3GlobalConfig.bCoreMutex)
            {
                pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
                pcache1.mutex     = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
            }
            pcache1.grp.mxPinned = 10;
            pcache1.isInit       = true;
            return(SQLITE_OK);
        }
Beispiel #3
0
 /*
 ** Implementation of the sqlite3_pcache.xShutdown method.
 ** Note that the static mutex allocated in xInit does
 ** not need to be freed.
 */
 static void pcache1Shutdown <T>(T NotUsed)
 {
     UNUSED_PARAMETER(NotUsed);
     Debug.Assert(pcache1.isInit);
     pcache1 = new PCacheGlobal();//;memset( &pcache1, 0, sizeof( pcache1 ) );
 }
 /*
 ** Implementation of the sqlite3_pcache.xShutdown method.
 ** Note that the static mutex allocated in xInit does 
 ** not need to be freed.
 */
 static void pcache1Shutdown( object NotUsed )
 {
   UNUSED_PARAMETER( NotUsed );
   Debug.Assert( pcache1.isInit != 0 );
   pcache1 = new PCacheGlobal(); //memset( &pcache1, 0, sizeof( pcache1 ) );
 }
    /******************************************************************************/
    /******** sqlite3_pcache Methods **********************************************/

    /*
    ** Implementation of the sqlite3_pcache.xInit method.
    */
    static int pcache1Init( object NotUsed )
    {
      UNUSED_PARAMETER( NotUsed );
      Debug.Assert( pcache1.isInit == 0 );
      pcache1 = new PCacheGlobal();// memset( &pcache1, 0, sizeof( pcache1 ) );
      if ( sqlite3GlobalConfig.bCoreMutex )
      {
        pcache1.mutex = sqlite3_mutex_alloc( SQLITE_MUTEX_STATIC_LRU );
      }
      pcache1.isInit = 1;
      return SQLITE_OK;
    }
Beispiel #6
0
 /*
 ** Implementation of the sqlite3_pcache.xShutdown method.
 ** Note that the static mutex allocated in xInit does
 ** not need to be freed.
 */
 private static void pcache1Shutdown(object NotUsed)
 {
     UNUSED_PARAMETER(NotUsed);
     Debug.Assert(pcache1.isInit != 0);
     pcache1 = new PCacheGlobal(); //memset( &pcache1, 0, sizeof( pcache1 ) );
 }