/ Check-in [c5dca114]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Made code to remove unused parameter warning part of the conditional. Ticket #3610. (CVS 6219)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c5dca1146de72071ed2e5fdf6890f41682272587
User & Date: shane 2009-01-30 16:09:23
Context
2009-01-30
17:27
Fix a round-off error when moving dates by negative modifier amounts. Ticket #3618. Enhance the "NNN years" modifier to accept fractional years. (CVS 6220) check-in: 86be908c user: drh tags: trunk
16:09
Made code to remove unused parameter warning part of the conditional. Ticket #3610. (CVS 6219) check-in: c5dca114 user: shane tags: trunk
06:11
Changes to setupLookaside() in main.c to better handle lookaside buffer configurations of zero-size. Ticket #3616. (CVS 6218) check-in: 0a2c7f74 user: shane tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/mutex_w32.c.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
...
210
211
212
213
214
215
216


217
218
219
220
221
222
223
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains the C functions that implement mutexes for win32
**
** $Id: mutex_w32.c,v 1.14 2009/01/30 05:40:27 shane Exp $
*/
#include "sqliteInt.h"

/*
** The code in this file is only used if we are compiling multithreaded
** on a win32 system.
*/
................................................................................
  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
  EnterCriticalSection(&p->mutex);
  p->owner = GetCurrentThreadId(); 
  p->nRef++;
}
static int winMutexTry(sqlite3_mutex *p){
  int rc = SQLITE_BUSY;
  UNUSED_PARAMETER(p);
  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
  /*
  ** The sqlite3_mutex_try() routine is very rarely used, and when it
  ** is used it is merely an optimization.  So it is OK for it to always
  ** fail.  
  **
  ** The TryEnterCriticalSection() interface is only available on WinNT.
................................................................................
  */
#if 0
  if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
    p->owner = GetCurrentThreadId();
    p->nRef++;
    rc = SQLITE_OK;
  }


#endif
  return rc;
}

/*
** The sqlite3_mutex_leave() routine exits a mutex that was
** previously entered by the same thread.  The behavior







|







 







<







 







>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
191
192
193
194
195
196
197

198
199
200
201
202
203
204
...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains the C functions that implement mutexes for win32
**
** $Id: mutex_w32.c,v 1.15 2009/01/30 16:09:23 shane Exp $
*/
#include "sqliteInt.h"

/*
** The code in this file is only used if we are compiling multithreaded
** on a win32 system.
*/
................................................................................
  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
  EnterCriticalSection(&p->mutex);
  p->owner = GetCurrentThreadId(); 
  p->nRef++;
}
static int winMutexTry(sqlite3_mutex *p){
  int rc = SQLITE_BUSY;

  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
  /*
  ** The sqlite3_mutex_try() routine is very rarely used, and when it
  ** is used it is merely an optimization.  So it is OK for it to always
  ** fail.  
  **
  ** The TryEnterCriticalSection() interface is only available on WinNT.
................................................................................
  */
#if 0
  if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
    p->owner = GetCurrentThreadId();
    p->nRef++;
    rc = SQLITE_OK;
  }
#else
  UNUSED_PARAMETER(p);
#endif
  return rc;
}

/*
** The sqlite3_mutex_leave() routine exits a mutex that was
** previously entered by the same thread.  The behavior