v0.13.0-bnema.1 9fea51b

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//go:noescape
14//go:linkname noescapeFixed runtime.noescape
15func noescapeFixed(p unsafe.Pointer) unsafe.Pointer
16
17// Syscall15 calls fn with up to 15 integer-class arguments without
18// allocating. Unused arguments must be 0. Unlike SyscallN it does not use a
19// variadic argument slice. Like SyscallN, a uintptr converted from an
20// unsafe.Pointer in the call expression keeps its object alive and un-moved
21// for the duration of the call (go:uintptrescapes); the object escapes to
22// the heap. The C function must not retain the pointer after returning.
23// Mixed integer/float arguments are not supported, as for SyscallN.
24//
25//go:uintptrescapes
26func Syscall15(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) {
27	if fn == 0 {
28		panic("purego: fn is nil")
29	}
30	if runtime.GOOS == "windows" {
31		return syscall_syscallN(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)
32	}
33	s := syscallArgs{
34		fn: fn, a1: a1, a2: a2, a3: a3, a4: a4, a5: a5,
35		a6: a6, a7: a7, a8: a8, a9: a9, a10: a10,
36		a11: a11, a12: a12, a13: a13, a14: a14, a15: a15,
37	}
38	// cgocall is synchronous: s remains on this goroutine's stack until it returns.
39	runtime_cgocall(syscallXABI0, noescapeFixed(unsafe.Pointer(&s)))
40	return s.a1, s.a2, s.a3
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