/ Check-in [31a26a1d]
Login

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

Overview
Comment:Fix typo in the Win32 implementation of sqlite3CompareAndSwap.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | mutexInitCmpSwap
Files: files | file ages | folders
SHA1: 31a26a1dd796e073e847e1e9c636f1976ffbb085
User & Date: mistachkin 2015-09-12 01:17:20
Context
2015-09-12
03:35
Add more asserts to the mutex subsystem. check-in: 7562f1fb user: mistachkin tags: mutexInitCmpSwap
01:17
Fix typo in the Win32 implementation of sqlite3CompareAndSwap. check-in: 31a26a1d user: mistachkin tags: mutexInitCmpSwap
2015-09-11
23:24
Make sure that the mutex implementation can be altered after calling sqlite3_shutdown(). check-in: dc2cf897 user: mistachkin tags: mutexInitCmpSwap
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/mutex_w32.c.

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  void *cmpVal,
  void *swapVal
){
#if defined(SQLITE_COMPARE_AND_SWAP)
  return SQLITE_COMPARE_AND_SWAP(pCurVal, cmpVal, swapVal);
#elif SQLITE_PTRSIZE>4
  return (void *)InterlockedCompareExchange64(
      (LONGLONG SQLITE_WIN32_VOLATILE *)pCurVal, (LONGLONG)cmpVal,
      (LONGLONG)swapVal);
#else
  return (void *)InterlockedCompareExchange(
      (LONG SQLITE_WIN32_VOLATILE *)pCurVal, (LONG)cmpVal,
      (LONG)swapVal);
#endif
}

/*
** Initialize and deinitialize the mutex subsystem.
*/
static sqlite3_mutex winMutex_staticMutexes[] = {







|
|


|
|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  void *cmpVal,
  void *swapVal
){
#if defined(SQLITE_COMPARE_AND_SWAP)
  return SQLITE_COMPARE_AND_SWAP(pCurVal, cmpVal, swapVal);
#elif SQLITE_PTRSIZE>4
  return (void *)InterlockedCompareExchange64(
      (LONGLONG SQLITE_WIN32_VOLATILE *)pCurVal, (LONGLONG)swapVal,
      (LONGLONG)cmpVal);
#else
  return (void *)InterlockedCompareExchange(
      (LONG SQLITE_WIN32_VOLATILE *)pCurVal, (LONG)swapVal,
      (LONG)cmpVal);
#endif
}

/*
** Initialize and deinitialize the mutex subsystem.
*/
static sqlite3_mutex winMutex_staticMutexes[] = {