SQLite

Check-in [e83a19e8cb]
Login

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

Overview
Comment:Add the SQLITE_THREADS_OVERRIDE_LOCKS compile-time option that disables the run-time test to see if threads can override each others locks on unix. (CVS 3050)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e83a19e8cb6d721b02502925b362f2e86b2de742
User & Date: drh 2006-01-31 23:03:35.000
Context
2006-02-01
01:55
Added support for the -enable-thread-override-lock option on the configure script. (CVS 3051) (check-in: 82f558bd11 user: drh tags: trunk)
2006-01-31
23:03
Add the SQLITE_THREADS_OVERRIDE_LOCKS compile-time option that disables the run-time test to see if threads can override each others locks on unix. (CVS 3050) (check-in: e83a19e8cb user: drh tags: trunk)
20:49
Patches to support linux on embedded platforms. (CVS 3049) (check-in: a088eb6d6e user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_unix.c.
348
349
350
351
352
353
354






355
356
357
358
359



360
361
362
363
364
365
366
367
368
369
370
/*
** This variable records whether or not threads can override each others
** locks.
**
**    0:  No.  Threads cannot override each others locks.
**    1:  Yes.  Threads can override each others locks.
**   -1:  We don't know yet.






**
** This variable normally has file scope only.  But during testing, we make
** it a global so that the test code can change its value in order to verify
** that the right stuff happens in either case.
*/



#ifdef SQLITE_TEST
int threadsOverrideEachOthersLocks = -1;
#else
static int threadsOverrideEachOthersLocks = -1;
#endif

/*
** This structure holds information passed into individual test
** threads by the testThreadLockingBehavior() routine.
*/
struct threadTestData {







>
>
>
>
>
>





>
>
>

|

|







348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
/*
** This variable records whether or not threads can override each others
** locks.
**
**    0:  No.  Threads cannot override each others locks.
**    1:  Yes.  Threads can override each others locks.
**   -1:  We don't know yet.
**
** On some systems, we know at compile-time if threads can override each
** others locks.  On those systems, the SQLITE_THREAD_OVERRIDE_LOCK macro
** will be set appropriately.  On other systems, we have to check at
** runtime.  On these latter systems, SQLTIE_THREAD_OVERRIDE_LOCK is
** undefined.
**
** This variable normally has file scope only.  But during testing, we make
** it a global so that the test code can change its value in order to verify
** that the right stuff happens in either case.
*/
#ifndef SQLITE_THREAD_OVERRIDE_LOCK
# define SQLITE_THREAD_OVERRIDE_LOCK -1
#endif
#ifdef SQLITE_TEST
int threadsOverrideEachOthersLocks = SQLITE_THREAD_OVERRIDE_LOCK;
#else
static int threadsOverrideEachOthersLocks = SQLITE_THREAD_OVERRIDE_LOCK;
#endif

/*
** This structure holds information passed into individual test
** threads by the testThreadLockingBehavior() routine.
*/
struct threadTestData {