1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Change OS_UNIX to SQLITE_OS_UNIX in test_thread.c. Modify notify2.test to

print out its timings in addition to reporting success or failure. (CVS 6382)

FossilOrigin-Name: 940d72d2bae95ddd1aea9b63424179735f440296
This commit is contained in:
drh
2009-03-24 18:42:16 +00:00
parent 86d7a3157c
commit 72bcfa6eeb
4 changed files with 21 additions and 15 deletions

View File

@@ -14,7 +14,7 @@
** test that sqlite3 database handles may be concurrently accessed by
** multiple threads. Right now this only works on unix.
**
** $Id: test_thread.c,v 1.13 2009/03/23 17:11:27 danielk1977 Exp $
** $Id: test_thread.c,v 1.14 2009/03/24 18:42:16 drh Exp $
*/
#include "sqliteInt.h"
@@ -115,7 +115,7 @@ static Tcl_ThreadCreateType tclScriptThread(ClientData pSqlThread){
interp = Tcl_CreateInterp();
Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0);
Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, pSqlThread, 0);
#if defined(OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
Tcl_CreateObjCommand(interp, "sqlite3_blocking_step", blocking_step_proc,0,0);
Tcl_CreateObjCommand(interp,
"sqlite3_blocking_prepare_v2", blocking_prepare_v2_proc, (void *)1, 0);
@@ -388,7 +388,7 @@ static int clock_seconds_proc(
** should be considered if these functions are to be extended (i.e. to
** support windows) in the future.
*/
#if defined(OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
/* BEGIN_SQLITE_BLOCKING_STEP */
/* This example uses the pthreads API */
@@ -610,7 +610,7 @@ static int blocking_prepare_v2_proc(
int SqlitetestThread_Init(Tcl_Interp *interp){
Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, 0, 0);
Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0);
#if defined(OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
Tcl_CreateObjCommand(interp, "sqlite3_blocking_step", blocking_step_proc,0,0);
Tcl_CreateObjCommand(interp,
"sqlite3_blocking_prepare_v2", blocking_prepare_v2_proc, (void *)1, 0);