Files
sift/vendor/modernc.org/sqlite/ofd_unix.go
T
kyle 2f9d3d97e6 p2: digest with in-sift FIFO, SQLite caches, Honcho context, recover
Dixie is capped (max_inflight 2, queue_depth 8, queue_wait 20s) and
never queued on llama-server. Streaming chat, thinking off, 45s
fallback to clean. Digest and chunk-embedding caches are
content-addressed SQLite (Honcho context is not cached). Recover
uses the guarded Fetcher. guardian-star is refused in code.
2026-09-22 23:54:49 -07:00

26 lines
869 B
Go

// Copyright 2026 The Sqlite Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build unix
package sqlite // import "modernc.org/sqlite"
import (
"modernc.org/libc"
sqlite3 "modernc.org/sqlite/lib"
)
// ofdLocking calls the modernc_ofd_locking() gate the transpiled library
// exports on every unix target: onoff 1 and 0 switch OFD locking on and
// off, negative queries it; the result is the previous setting, -1 where
// OFD locks are unavailable (every unix target but Linux always returns
// this), -2 when the mode is frozen by an already-attempted lock. The C
// side lives in modernc.org/libsqlite3's internal/sqlite_issue255.patch{,2}.
func ofdLocking(onoff int32) int32 {
tls := libc.NewTLS()
defer tls.Close()
return sqlite3.Xmodernc_ofd_locking(tls, onoff)
}