| 1 |
// Code generated by 'go generate' with gen.go. DO NOT EDIT. |
| 2 |
|
| 3 |
// SPDX-License-Identifier: Apache-2.0 |
| 4 |
// SPDX-FileCopyrightText: 2022 The Ebitengine Authors |
| 5 |
|
| 6 |
//go:build !cgo && (darwin || freebsd || linux || netbsd) |
| 7 |
|
| 8 |
package fakecgo |
| 9 |
|
| 10 |
import ( |
| 11 |
"syscall" |
| 12 |
"unsafe" |
| 13 |
) |
| 14 |
|
| 15 |
//go:nosplit |
| 16 |
//go:norace |
| 17 |
func malloc(size uintptr) unsafe.Pointer { |
| 18 |
ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0) |
| 19 |
// this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer |
| 20 |
return *(*unsafe.Pointer)(unsafe.Pointer(&ret)) |
| 21 |
} |
| 22 |
|
| 23 |
//go:nosplit |
| 24 |
//go:norace |
| 25 |
func free(ptr unsafe.Pointer) { |
| 26 |
call5(freeABI0, uintptr(ptr), 0, 0, 0, 0) |
| 27 |
} |
| 28 |
|
| 29 |
//go:nosplit |
| 30 |
//go:norace |
| 31 |
func setenv(name *byte, value *byte, overwrite int32) int32 { |
| 32 |
return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0)) |
| 33 |
} |
| 34 |
|
| 35 |
//go:nosplit |
| 36 |
//go:norace |
| 37 |
func unsetenv(name *byte) int32 { |
| 38 |
return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0)) |
| 39 |
} |
| 40 |
|
| 41 |
//go:nosplit |
| 42 |
//go:norace |
| 43 |
func sigfillset(set *sigset_t) int32 { |
| 44 |
return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0)) |
| 45 |
} |
| 46 |
|
| 47 |
//go:nosplit |
| 48 |
//go:norace |
| 49 |
func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 { |
| 50 |
return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0)) |
| 51 |
} |
| 52 |
|
| 53 |
//go:nosplit |
| 54 |
//go:norace |
| 55 |
func abort() { |
| 56 |
call5(abortABI0, 0, 0, 0, 0, 0) |
| 57 |
} |
| 58 |
|
| 59 |
//go:nosplit |
| 60 |
//go:norace |
| 61 |
func pthread_attr_init(attr *pthread_attr_t) int32 { |
| 62 |
return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) |
| 63 |
} |
| 64 |
|
| 65 |
//go:nosplit |
| 66 |
//go:norace |
| 67 |
func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 { |
| 68 |
return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0)) |
| 69 |
} |
| 70 |
|
| 71 |
//go:nosplit |
| 72 |
//go:norace |
| 73 |
func pthread_detach(thread pthread_t) int32 { |
| 74 |
return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0)) |
| 75 |
} |
| 76 |
|
| 77 |
//go:nosplit |
| 78 |
//go:norace |
| 79 |
func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 { |
| 80 |
return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0)) |
| 81 |
} |
| 82 |
|
| 83 |
//go:nosplit |
| 84 |
//go:norace |
| 85 |
func pthread_mutex_lock(mutex *pthread_mutex_t) int32 { |
| 86 |
return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) |
| 87 |
} |
| 88 |
|
| 89 |
//go:nosplit |
| 90 |
//go:norace |
| 91 |
func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 { |
| 92 |
return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) |
| 93 |
} |
| 94 |
|
| 95 |
//go:nosplit |
| 96 |
//go:norace |
| 97 |
func pthread_cond_broadcast(cond *pthread_cond_t) int32 { |
| 98 |
return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0)) |
| 99 |
} |
| 100 |
|
| 101 |
//go:nosplit |
| 102 |
//go:norace |
| 103 |
func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 { |
| 104 |
return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0)) |
| 105 |
} |
| 106 |
|
| 107 |
//go:linkname _malloc _malloc |
| 108 |
var _malloc uint8 |
| 109 |
var mallocABI0 = uintptr(unsafe.Pointer(&_malloc)) |
| 110 |
|
| 111 |
//go:linkname _free _free |
| 112 |
var _free uint8 |
| 113 |
var freeABI0 = uintptr(unsafe.Pointer(&_free)) |
| 114 |
|
| 115 |
//go:linkname _setenv _setenv |
| 116 |
var _setenv uint8 |
| 117 |
var setenvABI0 = uintptr(unsafe.Pointer(&_setenv)) |
| 118 |
|
| 119 |
//go:linkname _unsetenv _unsetenv |
| 120 |
var _unsetenv uint8 |
| 121 |
var unsetenvABI0 = uintptr(unsafe.Pointer(&_unsetenv)) |
| 122 |
|
| 123 |
//go:linkname _sigfillset _sigfillset |
| 124 |
var _sigfillset uint8 |
| 125 |
var sigfillsetABI0 = uintptr(unsafe.Pointer(&_sigfillset)) |
| 126 |
|
| 127 |
//go:linkname _nanosleep _nanosleep |
| 128 |
var _nanosleep uint8 |
| 129 |
var nanosleepABI0 = uintptr(unsafe.Pointer(&_nanosleep)) |
| 130 |
|
| 131 |
//go:linkname _abort _abort |
| 132 |
var _abort uint8 |
| 133 |
var abortABI0 = uintptr(unsafe.Pointer(&_abort)) |
| 134 |
|
| 135 |
//go:linkname _pthread_attr_init _pthread_attr_init |
| 136 |
var _pthread_attr_init uint8 |
| 137 |
var pthread_attr_initABI0 = uintptr(unsafe.Pointer(&_pthread_attr_init)) |
| 138 |
|
| 139 |
//go:linkname _pthread_create _pthread_create |
| 140 |
var _pthread_create uint8 |
| 141 |
var pthread_createABI0 = uintptr(unsafe.Pointer(&_pthread_create)) |
| 142 |
|
| 143 |
//go:linkname _pthread_detach _pthread_detach |
| 144 |
var _pthread_detach uint8 |
| 145 |
var pthread_detachABI0 = uintptr(unsafe.Pointer(&_pthread_detach)) |
| 146 |
|
| 147 |
//go:linkname _pthread_sigmask _pthread_sigmask |
| 148 |
var _pthread_sigmask uint8 |
| 149 |
var pthread_sigmaskABI0 = uintptr(unsafe.Pointer(&_pthread_sigmask)) |
| 150 |
|
| 151 |
//go:linkname _pthread_mutex_lock _pthread_mutex_lock |
| 152 |
var _pthread_mutex_lock uint8 |
| 153 |
var pthread_mutex_lockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_lock)) |
| 154 |
|
| 155 |
//go:linkname _pthread_mutex_unlock _pthread_mutex_unlock |
| 156 |
var _pthread_mutex_unlock uint8 |
| 157 |
var pthread_mutex_unlockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_unlock)) |
| 158 |
|
| 159 |
//go:linkname _pthread_cond_broadcast _pthread_cond_broadcast |
| 160 |
var _pthread_cond_broadcast uint8 |
| 161 |
var pthread_cond_broadcastABI0 = uintptr(unsafe.Pointer(&_pthread_cond_broadcast)) |
| 162 |
|
| 163 |
//go:linkname _pthread_setspecific _pthread_setspecific |
| 164 |
var _pthread_setspecific uint8 |
| 165 |
var pthread_setspecificABI0 = uintptr(unsafe.Pointer(&_pthread_setspecific)) |