mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
bump ncruces/go-sqlite3 to v0.20.2 (#3524)
This commit is contained in:
22
vendor/github.com/ncruces/go-sqlite3/vfs/memdb/memdb.go
generated
vendored
22
vendor/github.com/ncruces/go-sqlite3/vfs/memdb/memdb.go
generated
vendored
@ -78,19 +78,15 @@ type memDB struct {
|
||||
|
||||
// +checklocks:dataMtx
|
||||
data []*[sectorSize]byte
|
||||
|
||||
// +checklocks:dataMtx
|
||||
size int64
|
||||
|
||||
// +checklocks:lockMtx
|
||||
shared int32
|
||||
// +checklocks:lockMtx
|
||||
reserved bool
|
||||
// +checklocks:lockMtx
|
||||
pending bool
|
||||
|
||||
// +checklocks:memoryMtx
|
||||
refs int
|
||||
refs int32
|
||||
|
||||
shared int32 // +checklocks:lockMtx
|
||||
pending bool // +checklocks:lockMtx
|
||||
reserved bool // +checklocks:lockMtx
|
||||
|
||||
lockMtx sync.Mutex
|
||||
dataMtx sync.RWMutex
|
||||
@ -253,12 +249,12 @@ func (m *memFile) Unlock(lock vfs.LockLevel) error {
|
||||
m.lockMtx.Lock()
|
||||
defer m.lockMtx.Unlock()
|
||||
|
||||
if m.pending && m.lock >= vfs.LOCK_PENDING {
|
||||
m.pending = false
|
||||
}
|
||||
if m.reserved && m.lock >= vfs.LOCK_RESERVED {
|
||||
if m.lock >= vfs.LOCK_RESERVED {
|
||||
m.reserved = false
|
||||
}
|
||||
if m.lock >= vfs.LOCK_PENDING {
|
||||
m.pending = false
|
||||
}
|
||||
if lock < vfs.LOCK_SHARED {
|
||||
m.shared--
|
||||
}
|
||||
|
Reference in New Issue
Block a user