0
0
mirror of https://gitlab.com/cznic/sqlite.git synced 2025-05-17 23:26:41 +00:00
Files

24 lines
502 B
Go
Raw Permalink Normal View History

2019-12-19 15:58:58 +01:00
// Copyright 2019 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.
package sqlite // import "modernc.org/sqlite"
import (
"sync"
"unsafe"
2020-08-26 23:31:54 +02:00
"modernc.org/libc"
"modernc.org/libc/sys/types"
2019-12-19 15:58:58 +01:00
)
type mutex struct {
sync.Mutex
}
func mutexAlloc(tls *libc.TLS) uintptr {
return libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{})))
2019-12-21 11:00:50 +01:00
}
2020-08-26 23:31:54 +02:00
func mutexFree(tls *libc.TLS, m uintptr) { libc.Xfree(tls, m) }