1.1 --- a/extensions/sqlite/sqlite-source/mutex.h Fri Mar 28 06:21:34 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,82 +0,0 @@
1.4 -/*
1.5 -** 2007 August 28
1.6 -**
1.7 -** The author disclaims copyright to this source code. In place of
1.8 -** a legal notice, here is a blessing:
1.9 -**
1.10 -** May you do good and not evil.
1.11 -** May you find forgiveness for yourself and forgive others.
1.12 -** May you share freely, never taking more than you give.
1.13 -**
1.14 -*************************************************************************
1.15 -**
1.16 -** This file contains the common header for all mutex implementations.
1.17 -** The sqliteInt.h header #includes this file so that it is available
1.18 -** to all source files. We break it out in an effort to keep the code
1.19 -** better organized.
1.20 -**
1.21 -** NOTE: source files should *not* #include this header file directly.
1.22 -** Source files should #include the sqliteInt.h file and let that file
1.23 -** include this one indirectly.
1.24 -**
1.25 -** $Id$
1.26 -*/
1.27 -
1.28 -
1.29 -#ifdef SQLITE_MUTEX_APPDEF
1.30 -/*
1.31 -** If SQLITE_MUTEX_APPDEF is defined, then this whole module is
1.32 -** omitted and equivalent functionality must be provided by the
1.33 -** application that links against the SQLite library.
1.34 -*/
1.35 -#else
1.36 -/*
1.37 -** Figure out what version of the code to use. The choices are
1.38 -**
1.39 -** SQLITE_MUTEX_NOOP For single-threaded applications that
1.40 -** do not desire error checking.
1.41 -**
1.42 -** SQLITE_MUTEX_NOOP_DEBUG For single-threaded applications with
1.43 -** error checking to help verify that mutexes
1.44 -** are being used correctly even though they
1.45 -** are not needed. Used when SQLITE_DEBUG is
1.46 -** defined on single-threaded builds.
1.47 -**
1.48 -** SQLITE_MUTEX_PTHREADS For multi-threaded applications on Unix.
1.49 -**
1.50 -** SQLITE_MUTEX_W32 For multi-threaded applications on Win32.
1.51 -**
1.52 -** SQLITE_MUTEX_OS2 For multi-threaded applications on OS/2.
1.53 -*/
1.54 -#define SQLITE_MUTEX_NOOP 1 /* The default */
1.55 -#if defined(SQLITE_DEBUG) && !SQLITE_THREADSAFE
1.56 -# undef SQLITE_MUTEX_NOOP
1.57 -# define SQLITE_MUTEX_NOOP_DEBUG
1.58 -#endif
1.59 -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_UNIX
1.60 -# undef SQLITE_MUTEX_NOOP
1.61 -# define SQLITE_MUTEX_PTHREADS
1.62 -#endif
1.63 -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_WIN
1.64 -# undef SQLITE_MUTEX_NOOP
1.65 -# define SQLITE_MUTEX_W32
1.66 -#endif
1.67 -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_OS2
1.68 -# undef SQLITE_MUTEX_NOOP
1.69 -# define SQLITE_MUTEX_OS2
1.70 -#endif
1.71 -
1.72 -#ifdef SQLITE_MUTEX_NOOP
1.73 -/*
1.74 -** If this is a no-op implementation, implement everything as macros.
1.75 -*/
1.76 -#define sqlite3_mutex_alloc(X) ((sqlite3_mutex*)8)
1.77 -#define sqlite3_mutex_free(X)
1.78 -#define sqlite3_mutex_enter(X)
1.79 -#define sqlite3_mutex_try(X) SQLITE_OK
1.80 -#define sqlite3_mutex_leave(X)
1.81 -#define sqlite3_mutex_held(X) 1
1.82 -#define sqlite3_mutex_notheld(X) 1
1.83 -#endif
1.84 -
1.85 -#endif /* SQLITE_MUTEX_APPDEF */