detached 3a10209

syscall_fixed.go RawHistoryFolder

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
3
4//go:build darwin || freebsd || linux || netbsd || windows
5
6package purego
7
8import (
9	"runtime"
10	"unsafe"
11)
12
13// Syscall15 calls fn with up to 15 integer-class arguments. It does not
14// allocate per call once its argument pool is warm. Unused arguments must be 0. Unlike SyscallN it does not use a
15// variadic argument slice. Like SyscallN, a uintptr converted from an
16// unsafe.Pointer in the call expression keeps its object alive and un-moved
17// for the duration of the call (go:uintptrescapes); the object escapes to
18// the heap. The C function must not retain the pointer after returning.
19// Mixed integer/float arguments are not supported, as for SyscallN.
20//
21//go:uintptrescapes
22func Syscall15(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) {
23	if fn == 0 {
24		panic("purego: fn is nil")
25	}
26	if runtime.GOOS == "windows" {
27		return syscall_syscallN(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)
28	}
29	// Must not live on the goroutine stack: a Go callback made by fn can move
30	// that stack, and syscallX would store results through the stale address.
31	s := thePool.Get().(*syscallArgs)
32	*s = syscallArgs{
33		fn: fn, a1: a1, a2: a2, a3: a3, a4: a4, a5: a5,
34		a6: a6, a7: a7, a8: a8, a9: a9, a10: a10,
35		a11: a11, a12: a12, a13: a13, a14: a14, a15: a15,
36	}
37	runtime_cgocall(syscallXABI0, unsafe.Pointer(s))
38	r1, r2, err = s.a1, s.a2, s.a3
39	thePool.Put(s)
40	return r1, r2, err
41}
42
43// Syscall6 is Syscall15 with six arguments. Like Syscall15, pointer-derived
44// uintptr arguments keep their objects alive and cause them to escape.
45//
46//go:uintptrescapes
47func Syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) {
48	return Syscall15(fn, a1, a2, a3, a4, a5, a6, 0, 0, 0, 0, 0, 0, 0, 0, 0)
49}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close