diff --git a/README.md b/README.md index 1219ec9..71d77c4 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,13 @@ On Linux, macOS and illumos, this module uses to synchronize access to database files. OFD locks are fully compatible with process-associated POSIX advisory locks. -On BSD Unixes, this module may use +On BSD Unixes, this module uses [BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2). -BSD locks may _not_ be compatible with process-associated POSIX advisory locks. +On BSD Unixes, BSD locks _should_ be compatible with process-associated POSIX advisory locks. ##### TL;DR -In all platforms for which this package builds, +In all platforms for which this package builds out of the box, it should be safe to use it to access databases concurrently, from multiple goroutines, processes, and with _other_ implementations of SQLite. diff --git a/vfs/README.md b/vfs/README.md index 19e2a17..e4cdbd9 100644 --- a/vfs/README.md +++ b/vfs/README.md @@ -8,18 +8,17 @@ It also exposes interfaces that should allow you to implement your own custom VF ## Portability -This package is tested on Linux, macOS and Windows, -but it should also work on FreeBSD and illumos +This package is continuously tested on Linux, macOS and Windows, +but it should also work on BSD Unixes and illumos (code paths for those plaforms are tested on macOS and Linux, respectively). -In all platforms for which this package builds, +In all platforms for which this package builds out of the box, it should be safe to use it to access databases concurrently, from multiple goroutines, processes, and with _other_ implementations of SQLite. If the package does not build for your platform, -you may try to use the `sqlite3_flock` and `sqlite3_nolock` build tags. -These are only minimally tested and concurrency test failures should be expected. +you may try to use the `sqlite3_flock` or `sqlite3_nolock` build tags. The `sqlite3_flock` tag uses [BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2). diff --git a/vfs/os_bsd.go b/vfs/os_bsd.go index 1147556..bcc3f61 100644 --- a/vfs/os_bsd.go +++ b/vfs/os_bsd.go @@ -1,4 +1,4 @@ -//go:build sqlite3_flock || freebsd +//go:build (freebsd || openbsd || netbsd || dragonfly || sqlite3_flock) && !sqlite3_nolock package vfs diff --git a/vfs/os_nolock.go b/vfs/os_nolock.go index 21a5648..ec48008 100644 --- a/vfs/os_nolock.go +++ b/vfs/os_nolock.go @@ -1,4 +1,4 @@ -//go:build sqlite3_nolock && unix && !(linux || darwin || freebsd || illumos) +//go:build sqlite3_nolock && unix && !darwin package vfs diff --git a/vfs/os_ofd.go b/vfs/os_ofd.go index a728cd3..20aeede 100644 --- a/vfs/os_ofd.go +++ b/vfs/os_ofd.go @@ -1,4 +1,4 @@ -//go:build (linux || illumos) && !sqlite3_flock +//go:build (linux || illumos) && !(sqlite3_flock || sqlite3_nolock) package vfs