main
v1.0.0
modernc.org/SQLite/internal/threadtest1
Documentation
pkg.go.dev ↗threadtest1
/* ** 2002 January 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file implements a simple standalone program used to test whether ** or not the SQLite library is threadsafe. ** ** Testing the thread safety of SQLite is difficult because there are very ** few places in the code that are even potentially unsafe, and those ** places execute for very short periods of time. So even if the library ** is compiled with its mutexes disabled, it is likely to work correctly ** in a multi-threaded program most of the time. ** ** This file is NOT part of the standard SQLite library. It is used for ** testing only. */
Variables
X__stdfiles
var X__stdfiles [3]unsafe.Pointer
Xlock
var Xlock crt.Xpthread_mutex_t
Xsig
var Xsig crt.Xpthread_cond_t
Xstderr
var Xstderr unsafe.Pointer
Xstdin
var Xstdin unsafe.Pointer
Xstdout
var Xstdout unsafe.Pointer
Xthread_cnt
var Xthread_cnt int32
Functions
X_start
func X_start(tls *crt.TLS, _argc int32, _argv **int8)
Xdb_check
func Xdb_check(tls *crt.TLS, _zFile *int8, _zMsg *int8, _az **int8, args ...interface{})
C comment
/* ** Check results */
Xdb_execute
func Xdb_execute(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8, args ...interface{})
C comment
/* ** Execute an SQL statement. */
Xdb_query
func Xdb_query(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8, args ...interface{}) (r0 **int8)
C comment
/* ** Execute a query against the database. NULL values are returned ** as an empty string. The list is terminated by a single NULL pointer. */
Xdb_query_free
func Xdb_query_free(tls *crt.TLS, _az **int8)
C comment
/* ** Free the results of a db_query() call. */
Xmain
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32)
Types
TQueryResult
type TQueryResult struct {
XzFile *int8
XnElem int32
XnAlloc int32
XazElem **int8
} // t3 struct{zFile *int8,nElem int32,nAlloc int32,azElem **int8}