Skip to content

Commit db3e6da

Browse files
committed
BSD locks.
1 parent 3f443b2 commit db3e6da

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ On Linux, macOS and illumos, this module uses
5757
to synchronize access to database files.
5858
OFD locks are fully compatible with process-associated POSIX advisory locks.
5959

60-
On BSD Unixes, this module may use
60+
On BSD Unixes, this module uses
6161
[BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2).
62-
BSD locks may _not_ be compatible with process-associated POSIX advisory locks.
62+
On BSD Unixes, BSD locks _should_ be compatible with process-associated POSIX advisory locks.
6363

6464
##### TL;DR
6565

66-
In all platforms for which this package builds,
66+
In all platforms for which this package builds out of the box,
6767
it should be safe to use it to access databases concurrently,
6868
from multiple goroutines, processes, and
6969
with _other_ implementations of SQLite.

vfs/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ It also exposes interfaces that should allow you to implement your own custom VF
88

99
## Portability
1010

11-
This package is tested on Linux, macOS and Windows,
12-
but it should also work on FreeBSD and illumos
11+
This package is continuously tested on Linux, macOS and Windows,
12+
but it should also work on BSD Unixes and illumos
1313
(code paths for those plaforms are tested on macOS and Linux, respectively).
1414

15-
In all platforms for which this package builds,
15+
In all platforms for which this package builds out of the box,
1616
it should be safe to use it to access databases concurrently,
1717
from multiple goroutines, processes, and
1818
with _other_ implementations of SQLite.
1919

2020
If the package does not build for your platform,
21-
you may try to use the `sqlite3_flock` and `sqlite3_nolock` build tags.
22-
These are only minimally tested and concurrency test failures should be expected.
21+
you may try to use the `sqlite3_flock` or `sqlite3_nolock` build tags.
2322

2423
The `sqlite3_flock` tag uses
2524
[BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2).

vfs/os_bsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build sqlite3_flock || freebsd
1+
//go:build (freebsd || openbsd || netbsd || dragonfly || sqlite3_flock) && !sqlite3_nolock
22

33
package vfs
44

vfs/os_nolock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build sqlite3_nolock && unix && !(linux || darwin || freebsd || illumos)
1+
//go:build sqlite3_nolock && unix && !darwin
22

33
package vfs
44

vfs/os_ofd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build (linux || illumos) && !sqlite3_flock
1+
//go:build (linux || illumos) && !(sqlite3_flock || sqlite3_nolock)
22

33
package vfs
44

0 commit comments

Comments
 (0)