summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite/src/os_unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/os_unix.h')
-rw-r--r--ext/pdo_sqlite/sqlite/src/os_unix.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/os_unix.h b/ext/pdo_sqlite/sqlite/src/os_unix.h
index 4ea0aee362..5fdfc2ff4c 100644
--- a/ext/pdo_sqlite/sqlite/src/os_unix.h
+++ b/ext/pdo_sqlite/sqlite/src/os_unix.h
@@ -52,6 +52,17 @@
#include <unistd.h>
/*
+** Macros used to determine whether or not to use threads. The
+** SQLITE_UNIX_THREADS macro is defined if we are synchronizing for
+** Posix threads and SQLITE_W32_THREADS is defined if we are
+** synchronizing using Win32 threads.
+*/
+#if defined(THREADSAFE) && THREADSAFE
+# include <pthread.h>
+# define SQLITE_UNIX_THREADS 1
+#endif
+
+/*
** The OsFile structure is a operating-system independing representation
** of an open file handle. It is defined differently for each architecture.
**
@@ -70,6 +81,9 @@ struct OsFile {
unsigned char isOpen; /* True if needs to be closed */
unsigned char fullSync; /* Use F_FULLSYNC if available */
int dirfd; /* File descriptor for the directory */
+#ifdef SQLITE_UNIX_THREADS
+ pthread_t tid; /* The thread authorized to use this OsFile */
+#endif
};
/*