v0.4.0-alpha.1 09d3b2f

callbacks.go RawHistoryFolder

1// Copyright 2011 The Go 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
5//go:build darwin || linux
6
7package fakecgo
8
9import _ "unsafe"
10
11// TODO: decide if we need _runtime_cgo_panic_internal
12
13//go:linkname x_cgo_init_trampoline x_cgo_init_trampoline
14//go:linkname _cgo_init _cgo_init
15var x_cgo_init_trampoline byte
16var _cgo_init = &x_cgo_init_trampoline
17
18// Creates a new system thread without updating any Go state.
19//
20// This method is invoked during shared library loading to create a new OS
21// thread to perform the runtime initialization. This method is similar to
22// _cgo_sys_thread_start except that it doesn't update any Go state.
23
24//go:linkname x_cgo_thread_start_trampoline x_cgo_thread_start_trampoline
25//go:linkname _cgo_thread_start _cgo_thread_start
26var x_cgo_thread_start_trampoline byte
27var _cgo_thread_start = &x_cgo_thread_start_trampoline
28
29// Notifies that the runtime has been initialized.
30//
31// We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)
32// to ensure that the runtime has been initialized before the CGO call is
33// executed. This is necessary for shared libraries where we kickoff runtime
34// initialization in a separate thread and return without waiting for this
35// thread to complete the init.
36
37//go:linkname x_cgo_notify_runtime_init_done_trampoline x_cgo_notify_runtime_init_done_trampoline
38//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done
39var x_cgo_notify_runtime_init_done_trampoline byte
40var _cgo_notify_runtime_init_done = &x_cgo_notify_runtime_init_done_trampoline
41
42// TODO: decide if we need x_cgo_set_context_function
43// TODO: decide if we need _cgo_yield
44
45var (
46	// In Go 1.20 the race detector was rewritten to pure Go
47	// on darwin. This means that when CGO_ENABLED=0 is set
48	// fakecgo is built with race detector code. This is not
49	// good since this code is pretending to be C. The go:norace
50	// pragma is not enough, since it only applies to the native
51	// ABIInternal function. The ABIO wrapper (which is necessary,
52	// since all references to text symbols from assembly will use it)
53	// does not inherit the go:norace pragma, so it will still be
54	// instrumented by the race detector.
55	//
56	// To circumvent this issue, using closure calls in the
57	// assembly, which forces the compiler to use the ABIInternal
58	// native implementation (which has go:norace) instead.
59	threadentry_call        = threadentry
60	x_cgo_init_call         = x_cgo_init
61	x_cgo_setenv_call       = x_cgo_setenv
62	x_cgo_unsetenv_call     = x_cgo_unsetenv
63	x_cgo_thread_start_call = x_cgo_thread_start
64)

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