source: code/trunk/vendor/modernc.org/sqlite/mutex.go@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 502 bytes
Line 
1// Copyright 2019 The Sqlite Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package sqlite // import "modernc.org/sqlite"
6
7import (
8 "sync"
9 "unsafe"
10
11 "modernc.org/libc"
12 "modernc.org/libc/sys/types"
13)
14
15type mutex struct {
16 sync.Mutex
17}
18
19func mutexAlloc(tls *libc.TLS) uintptr {
20 return libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{})))
21}
22
23func mutexFree(tls *libc.TLS, m uintptr) { libc.Xfree(tls, m) }
Note: See TracBrowser for help on using the repository browser.