mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-08 06:09:33 -06:00
[chore]: Bump modernc.org/sqlite from 1.26.0 to 1.27.0 (#2339)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
41435a6c4e
commit
28f85db30a
20 changed files with 526 additions and 143 deletions
31
vendor/modernc.org/libc/pthread.go
generated
vendored
31
vendor/modernc.org/libc/pthread.go
generated
vendored
|
|
@ -34,7 +34,9 @@ var (
|
|||
|
||||
// Thread local storage.
|
||||
type TLS struct {
|
||||
errnop uintptr
|
||||
errnop uintptr
|
||||
allocaStack [][]uintptr
|
||||
allocas []uintptr
|
||||
pthreadData
|
||||
stack stackHeader
|
||||
|
||||
|
|
@ -61,6 +63,33 @@ func newTLS(detached bool) *TLS {
|
|||
return t
|
||||
}
|
||||
|
||||
func (t *TLS) alloca(n size_t) (r uintptr) {
|
||||
r = Xmalloc(t, n)
|
||||
t.allocas = append(t.allocas, r)
|
||||
return r
|
||||
}
|
||||
|
||||
func (t *TLS) FreeAlloca() func() {
|
||||
t.allocaStack = append(t.allocaStack, t.allocas)
|
||||
t.allocas = nil
|
||||
return func() {
|
||||
for _, v := range t.allocas {
|
||||
Xfree(t, v)
|
||||
}
|
||||
n := len(t.allocaStack)
|
||||
t.allocas = t.allocaStack[n-1]
|
||||
t.allocaStack = t.allocaStack[:n-1]
|
||||
}
|
||||
}
|
||||
|
||||
func Xalloca(tls *TLS, size size_t) uintptr {
|
||||
return tls.alloca(size)
|
||||
}
|
||||
|
||||
func X__builtin_alloca(tls *TLS, size size_t) uintptr {
|
||||
return Xalloca(tls, size)
|
||||
}
|
||||
|
||||
// Pthread specific part of a TLS.
|
||||
type pthreadData struct {
|
||||
done chan struct{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue