Documentation
¶
Overview ¶
cstr.go — shared C-string helper (cross-platform).
errno.go — per-goroutine errno via GLS.
The C-side `errno` macro expands to `*__errno_location()`, and c2go routes the standard glibc/musl accessor name __errno_location to ErrnoPtr below (see the c2go_linkname on __errno_location in <c2go.h>). It returns the address of the calling goroutine's int32 errno so ported C source that touches errno resolves to the same per-goroutine slot the `errno` macro reads.
gls.go — goroutine-local storage for c2go-libc, backed by github.com/timandy/routine.
Per-goroutine c2go-libc state lives in a single *tlsState held in a routine.ThreadLocal. timandy stores it in the goroutine's g.labels slot (profiler-safe: its `thread` struct leads with a labelMap) and transparently recreates it when a recycled g reports a new goid. NON-inheritable: a new pthread (a goroutine spawned by pthread_create) starts with fresh state, matching POSIX — errno and __thread do not inherit across pthread_create.
The field set grows as support lands: errno, plus pthread_key thread-specific data (tls / keyDeath, see pthread_key.go).
handle.go — a dense id->object handle table: the shared rooting + identity substrate for Go state referenced by unmanaged C carriers. Current users include POSIX synchronization objects, threads, directory streams, FILE locks, popen processes, and iconv descriptor lifetimes.
Most users place a 64-bit `_id` in plain unmanaged C memory. Some APIs expose the id as a scalar handle, while iconv returns the real Go pointer and uses the table only as its C-lifetime root. The table is specialized to one *T per id rather than malloc.go's one []byte per allocation.
id = generation<<32 | (registry index + 1), so id 0 stays reserved for "uninitialized" and a recycled slot retires every stale copy of its old id (#658 M6). A freelist recycles indices, bounding the registry to the high-water count of concurrently-live objects. Every operation is under one global RWMutex — the hot lookup path only resolves (get), so it takes the read lock and resolves in parallel, while init/destroy take the write lock. A RWMutex (not the plain Mutex malloc.go uses) is the right fit precisely because this table — unlike malloc's write-only one — is read-dominated in steady state: the real st.Lock() runs outside this lock, so after init nearly every table access is a get(). Measured ~15-30% faster than a Mutex at 4-8 cores for that pattern; the read-lock's shared reader count still bounces between cores, so at high core counts this converges toward the plain Mutex and the real fix becomes a chunked lock-free table — which can replace this without changing the API.
Values are stored as *T, never T by value: the registry slice is reallocated when it grows, which copies its elements — and Go forbids copying a used sync.Mutex — so only the pointers ever move, never the states they point at.
malloc.go — the libc malloc/free/calloc/realloc/aligned_alloc family, implemented in Go over per-allocation make([]byte) slices.
Go's runtime allocator IS the malloc engine: every malloc() is one make([]byte) (size-classed, per-P cached, zeroed by the runtime). The only job left here is ROOTING — C code stores the returned pointer where the GC cannot see it (inside other malloc'd noscan bytes), so each live allocation's backing slice must be referenced from a Go-visible root until free(). That root is a dense handle table ([][]byte plus a free-index list). The handle index and the payload size live in a 16-byte header immediately before the returned pointer, which also guarantees max_align_t (16-byte) alignment and gives realloc its copy size without a table lookup.
free() just drops the root (registry slot -> nil): the bytes become unreachable and the next GC cycle reclaims them — ordinary Go object lifetime, pacer-accounted. Deliberately NOT runtime.mallocgc with nil typ: a bare noscan block with no Go-side reference is reclaimed while C still holds pointers to it. GC-TRACKED allocation stays explicit via GCMalloc (gc_malloc.go).
The C callers reach these through the c2go_linkname declarations in <stdlib.h> (github.com/c2gohq/c2go_libc.Malloc etc., GoABI0) — the same C-calls-Go pattern as gc_malloc/GCMalloc.
process.go — process-control and environment bridges (cross-platform).
exit/atexit and the atexit handler registry live in C (source/stdlib.c) so the registered C function pointers are invoked with a native call; only the final process termination crosses into Go here, because os.Exit is the sole way to stop the Go runtime. getenv/setenv/unsetenv are implemented directly in Go over the os package, which owns the process environment under the Go runtime.
stdio.go — the Go state behind root libc's FILE locks (csrc/stdio.c). Root FILE keeps a generation-stamped integer handle because its C carrier is unmanaged. The recursive lock algorithm itself lives in internal/posixstdio and is shared with mlib, whose managed FILE stores the Go pointer directly.
time.go — the Go clock bridge behind <time.h>/<sys/time.h> (cross-platform).
c2go-compiled C cannot read a clock itself, so the "now" primitive comes from Go's time package. The C wrappers (source/time.c) shape it into time_t / struct timespec / struct timeval and own the calendar math. The clock ids are c2go-uniform (see <time.h>), interpreted here, NOT host clock_gettime ids.
Index ¶
- Constants
- func A64l(s *byte) int64
- func Abort()
- func Abs(a int32) int32
- func Access(path *byte, amode int32) int32
- func Acos(x float64) float64
- func Acosf(x float32) float32
- func Acosh(x float64) float64
- func Acoshf(x float32) float32
- func AlignedAlloc(align uint64, size uint64) unsafe.Pointer
- func Alphasort(a **dirent, b **dirent) int32
- func Asctime(tm *tm) *byte
- func AsctimeR(tm *tm, buf *byte) *byte
- func Asin(x float64) float64
- func Asinf(x float32) float32
- func Asinh(x float64) float64
- func Asinhf(x float32) float32
- func Asprintf(s **byte, fmt *byte, argptrs unsafe.Pointer) int32
- func AssertFail(expr *byte, file *byte, line int32, fn *byte)
- func AtQuickExit(f uintptr) int32
- func Atan(x float64) float64
- func Atan2(y float64, x float64) float64
- func Atan2f(y float32, x float32) float32
- func Atanf(x float32) float32
- func Atanh(x float64) float64
- func Atanhf(x float32) float32
- func Atexit(f uintptr) int32
- func Atof(s *byte) float64
- func Atoi(s *byte) int32
- func Atol(s *byte) int64
- func Atoll(s *byte) int64
- func Basename(s *byte) *byte
- func BindTextdomainCodeset(domainname *byte, codeset *byte) *byte
- func Bindtextdomain(domainname *byte, dirname *byte) *byte
- func Bsearch(key unsafe.Pointer, base unsafe.Pointer, nel uint64, width uint64, cmp uintptr) unsafe.Pointer
- func Btowc(c int32) uint32
- func Bzero(s unsafe.Pointer, n uint64)
- func C2goFileRawClose(f *FILE) int32
- func C2goFileRawFdopen(f *FILE, fd int32, mode *byte, storage *byte, storage_size uint64) int32
- func C2goFileRawFgetwc(f *FILE) uint32
- func C2goFileRawFgetws(s *int32, n int32, f *FILE) *int32
- func C2goFileRawFmemopen(f *FILE, cookie_storage unsafe.Pointer, cookie_storage_size uint64, ...) int32
- func C2goFileRawFputwc(c int32, f *FILE) uint32
- func C2goFileRawFputws(ws *int32, f *FILE) int32
- func C2goFileRawFwide(f *FILE, mode int32) int32
- func C2goFileRawGetdelimManaged(s *unsafe.Pointer, n *uint64, delim int32, f *FILE) int64
- func C2goFileRawOpen(f *FILE, filename *byte, mode *byte, storage *byte, storage_size uint64) int32
- func C2goFileRawStdinit(f *FILE, which int32, storage *byte, storage_size uint64) int32
- func C2goFileRawUngetwc(c uint32, f *FILE) uint32
- func C2goFileRawVfscanfManaged(f *FILE, fmt *byte, ap *__va_list_tag) int32
- func C2goFileRawVfwprintf(f *FILE, fmt *int32, ap *__va_list_tag) int32
- func C2goFileRawVfwscanfManaged(f *FILE, fmt *int32, ap *__va_list_tag) int32
- func C2goFinalize()
- func C2goPthreadRun(start uintptr, arg unsafe.Pointer) unsafe.Pointer
- func C2goPthreadRunDtor(fn uintptr, arg unsafe.Pointer)
- func C2goPthreadRunVoid(fn uintptr)
- func C2goSignalRun(sig int32, h uint64)
- func C2goVsscanfManaged(s *byte, fmt *byte, ap *__va_list_tag) int32
- func C2goVswscanfManaged(s *int32, fmt *int32, ap *__va_list_tag) int32
- func C16rtomb(s *byte, c16 uint16, ps *__mbstate_t) uint64
- func C32rtomb(s *byte, c32 uint32, ps *__mbstate_t) uint64
- func Calloc(nmemb uint64, size uint64) unsafe.Pointer
- func Cbrt(x float64) float64
- func Cbrtf(x float32) float32
- func Ceil(x float64) float64
- func Ceilf(x float32) float32
- func Cfgetispeed(tio *termios) uint32
- func Cfgetospeed(tio *termios) uint32
- func Cfmakeraw(t *termios)
- func Cfsetispeed(tio *termios, speed uint32) int32
- func Cfsetospeed(tio *termios, speed uint32) int32
- func Cfsetspeed(tio *termios, speed uint32) int32
- func Chdir(path *byte) int32
- func Chmod(path *byte, mode uint32) int32
- func Chown(path *byte, uid uint32, gid uint32) int32
- func Clearenv() int32
- func Clearerr(f *FILE)
- func Clock() int64
- func ClockGetres(id int32, ts *timespec) int32
- func ClockGettime(id int32, ts *timespec) int32
- func Close(fd int32) int32
- func Closedir(d *__dirstream) int32
- func Copysign(x float64, y float64) float64
- func Copysignf(x float32, y float32) float32
- func Cos(x float64) float64
- func Cosf(x float32) float32
- func Cosh(x float64) float64
- func Coshf(x float32) float32
- func Creat(path *byte, mode uint32) int32
- func Ctime(t *int64) *byte
- func CtimeR(t *int64, buf *byte) *byte
- func CtypeGetMbCurMax() uint64
- func Dcgettext(domainname *byte, msgid *byte, category int32) *byte
- func Dcngettext(domainname *byte, msgid1 *byte, msgid2 *byte, n uint64, category int32) *byte
- func Dgettext(domainname *byte, msgid *byte) *byte
- func Difftime(t1 int64, t0 int64) float64
- func Dirfd(d *__dirstream) int32
- func Dirname(s *byte) *byte
- func Div(num int32, den int32) (int32, int32)
- func Dngettext(domainname *byte, msgid1 *byte, msgid2 *byte, n uint64) *byte
- func Dprintf(fd int32, fmt *byte, argptrs unsafe.Pointer) int32
- func Drand48() float64
- func Dup(fd int32) int32
- func Dup2(oldfd int32, newfd int32) int32
- func Dup3(oldfd int32, newfd int32, flags int32) int32
- func Duplocale(loc *__locale_struct) *__locale_struct
- func EnvironSync()
- func Erand48(s *uint16) float64
- func Erf(x float64) float64
- func Erfc(x float64) float64
- func Erfcf(x float32) float32
- func Erff(x float32) float32
- func Err(status int32, fmt *byte, argptrs unsafe.Pointer)
- func ErrnoPtr() *int32
- func Errx(status int32, fmt *byte, argptrs unsafe.Pointer)
- func Exit(code int32)
- func Exp(x float64) float64
- func Exp2(x float64) float64
- func Exp2f(x float32) float32
- func Exp10(x float64) float64
- func Expf(x float32) float32
- func ExplicitBzero(d unsafe.Pointer, n uint64)
- func Expm1(x float64) float64
- func Expm1f(x float32) float32
- func Fabs(x float64) float64
- func Fabsf(x float32) float32
- func Fchdir(fd int32) int32
- func Fchmod(fd int32, mode uint32) int32
- func Fchown(fd int32, uid uint32, gid uint32) int32
- func Fclose(f *FILE) int32
- func Fcntl(fd int32, cmd int32, argptrs unsafe.Pointer) int32
- func Fdatasync(fd int32) int32
- func Fdim(x float64, y float64) float64
- func Fdimf(x float32, y float32) float32
- func Fdopendir(fd int32) *__dirstream
- func Feclearexcept(mask int32) int32
- func Fegetenv(envp *uint32) int32
- func Fegetround() int32
- func Feof(f *FILE) int32
- func Feraiseexcept(mask int32) int32
- func Ferror(f *FILE) int32
- func Fesetenv(envp *uint32) int32
- func Fesetround(r int32) int32
- func Fetestexcept(mask int32) int32
- func Fflush(f *FILE) int32
- func Ffs(i int32) int32
- func Ffsl(i int64) int32
- func Ffsll(i int64) int32
- func Fgetc(f *FILE) int32
- func Fgetpos(f *FILE, pos *int64) int32
- func Fgets(s *byte, n int32, f *FILE) *byte
- func Fgetwc(f *FILE) uint32
- func Fgetws(s *int32, n int32, f *FILE) *int32
- func Fileno(f *FILE) int32
- func Flock(fd int32, op int32) int32
- func Flockfile(f *FILE)
- func Floor(x float64) float64
- func Floorf(x float32) float32
- func Fma(x float64, y float64, z float64) float64
- func Fmaf(x float32, y float32, z float32) float32
- func Fmax(x float64, y float64) float64
- func Fmaxf(x float32, y float32) float32
- func Fmin(x float64, y float64) float64
- func Fminf(x float32, y float32) float32
- func Fmod(x float64, y float64) float64
- func Fmodf(x float32, y float32) float32
- func Fnmatch(pat *byte, str *byte, flags int32) int32
- func Fprintf(f *FILE, fmt *byte, argptrs unsafe.Pointer) int32
- func Fputc(c int32, f *FILE) int32
- func Fputs(s *byte, f *FILE) int32
- func Fputwc(c int32, f *FILE) uint32
- func Fputws(ws *int32, f *FILE) int32
- func Fread(destv unsafe.Pointer, size uint64, nmemb uint64, f *FILE) uint64
- func Free(ap unsafe.Pointer)
- func Freelocale(loc *__locale_struct)
- func Frexp(x float64, e *int32) float64
- func Frexpf(x float32, e *int32) float32
- func Fscanf(f *FILE, fmt *byte, argptrs unsafe.Pointer) int32
- func Fseek(f *FILE, off int64, whence int32) int32
- func Fseeko(f *FILE, off int64, whence int32) int32
- func Fsetpos(f *FILE, pos *int64) int32
- func Fstat(fd int32, buf *stat) int32
- func Fstatat(dirfd int32, path *byte, st *stat, flags int32) int32
- func Fsync(fd int32) int32
- func Ftell(f *FILE) int64
- func Ftello(f *FILE) int64
- func Ftruncate(fd int32, len int64) int32
- func Ftrylockfile(f *FILE) int32
- func Ftw(path *byte, fn uintptr, fd_limit int32) int32
- func Funlockfile(f *FILE)
- func Futimens(fd int32, times *timespec) int32
- func Fwide(f *FILE, mode int32) int32
- func Fwprintf(f *FILE, fmt *int32, argptrs unsafe.Pointer) int32
- func Fwrite(src unsafe.Pointer, size uint64, nmemb uint64, f *FILE) uint64
- func Fwscanf(f *FILE, fmt *int32, argptrs unsafe.Pointer) int32
- func GCMalloc(typeInfo unsafe.Pointer, n uint64) unsafe.Pointer
- func Getc(f *FILE) int32
- func Getchar() int32
- func Getcwd(buf *byte, size uint64) *byte
- func Getdelim(s **byte, n *uint64, delim int32, f *FILE) int64
- func Getegid() uint32
- func Getentropy(buf unsafe.Pointer, n uint64) int32
- func Getenv(name *byte) *byte
- func Geteuid() uint32
- func Getgid() uint32
- func Gethostname(buf *byte, n uint64) int32
- func Getline(s **byte, n *uint64, f *FILE) int64
- func Getopt(argc int32, argv **byte, optstring *byte) int32
- func GetoptLong(argc int32, argv **byte, optstring *byte, longopts *option, idx *int32) int32
- func GetoptLongOnly(argc int32, argv **byte, optstring *byte, longopts *option, idx *int32) int32
- func Getpagesize() int32
- func Getpid() int32
- func Getppid() int32
- func Getrlimit(resource int32, rlim *rlimit) int32
- func Getrusage(who int32, ru *rusage) int32
- func Getsubopt(opt **byte, keys **byte, val **byte) int32
- func Gettext(msgid *byte) *byte
- func Gettimeofday(tv *timeval, tz unsafe.Pointer) int32
- func Getuid() uint32
- func Getw(f *FILE) int32
- func Getwc(f *FILE) uint32
- func Getwchar() uint32
- func Glob(pat *byte, flags int32, errfunc uintptr, g *glob_t) int32
- func Globfree(g *glob_t)
- func Gmtime(t *int64) *tm
- func GmtimeR(t *int64, tm *tm) *tm
- func Hcreate(nel uint64) int32
- func HcreateR(nel uint64, htab *hsearch_data) int32
- func Hdestroy()
- func HdestroyR(htab *hsearch_data)
- func Hsearch(item entry, action uintptr) *entry
- func HsearchR(item entry, action uintptr, retval **entry, htab *hsearch_data) int32
- func Hypot(x float64, y float64) float64
- func Hypotf(x float32, y float32) float32
- func Iconv(cd unsafe.Pointer, inbuf **byte, inleft *uint64, outbuf **byte, ...) uint64
- func IconvClose(cd unsafe.Pointer) int32
- func IconvOpen(to, from *byte) unsafe.Pointer
- func Ilogb(x float64) int32
- func Ilogbf(x float32) int32
- func Imaxabs(a int64) int64
- func Imaxdiv(num int64, den int64) (int64, int64)
- func Initstate(seed uint32, state *byte, size uint64) *byte
- func Insque(element unsafe.Pointer, pred unsafe.Pointer)
- func Ioctl(fd int32, req int32, argptrs unsafe.Pointer) int32
- func Isalnum(c int32) int32
- func IsalnumL(c int32, l *__locale_struct) int32
- func Isalpha(c int32) int32
- func IsalphaL(c int32, l *__locale_struct) int32
- func Isascii(c int32) int32
- func Isatty(fd int32) int32
- func Isblank(c int32) int32
- func IsblankL(c int32, l *__locale_struct) int32
- func Iscntrl(c int32) int32
- func IscntrlL(c int32, l *__locale_struct) int32
- func Isdigit(c int32) int32
- func IsdigitL(c int32, l *__locale_struct) int32
- func Isgraph(c int32) int32
- func IsgraphL(c int32, l *__locale_struct) int32
- func Islower(c int32) int32
- func IslowerL(c int32, l *__locale_struct) int32
- func Isprint(c int32) int32
- func IsprintL(c int32, l *__locale_struct) int32
- func Ispunct(c int32) int32
- func IspunctL(c int32, l *__locale_struct) int32
- func Isspace(c int32) int32
- func IsspaceL(c int32, l *__locale_struct) int32
- func Isupper(c int32) int32
- func IsupperL(c int32, l *__locale_struct) int32
- func Iswalnum(wc uint32) int32
- func IswalnumL(c uint32, l *__locale_struct) int32
- func Iswalpha(wc uint32) int32
- func IswalphaL(c uint32, l *__locale_struct) int32
- func Iswblank(wc uint32) int32
- func IswblankL(c uint32, l *__locale_struct) int32
- func Iswcntrl(wc uint32) int32
- func IswcntrlL(c uint32, l *__locale_struct) int32
- func Iswctype(wc uint32, t uint64) int32
- func IswctypeL(c uint32, t uint64, l *__locale_struct) int32
- func Iswdigit(wc uint32) int32
- func IswdigitL(c uint32, l *__locale_struct) int32
- func Iswgraph(wc uint32) int32
- func IswgraphL(c uint32, l *__locale_struct) int32
- func Iswlower(wc uint32) int32
- func IswlowerL(c uint32, l *__locale_struct) int32
- func Iswprint(wc uint32) int32
- func IswprintL(c uint32, l *__locale_struct) int32
- func Iswpunct(wc uint32) int32
- func IswpunctL(c uint32, l *__locale_struct) int32
- func Iswspace(wc uint32) int32
- func IswspaceL(c uint32, l *__locale_struct) int32
- func Iswupper(wc uint32) int32
- func IswupperL(c uint32, l *__locale_struct) int32
- func Iswxdigit(wc uint32) int32
- func IswxdigitL(c uint32, l *__locale_struct) int32
- func Isxdigit(c int32) int32
- func IsxdigitL(c int32, l *__locale_struct) int32
- func J0(x float64) float64
- func J1(x float64) float64
- func Jn(n int32, x float64) float64
- func Jrand48(s *uint16) int64
- func Kill(pid int32, sig int32) int32
- func L64a(x0 int64) *byte
- func Labs(a int64) int64
- func Lchown(path *byte, uid uint32, gid uint32) int32
- func Lcong48(p *uint16)
- func Ldexp(x float64, n int32) float64
- func Ldexpf(x float32, n int32) float32
- func Ldiv(num int64, den int64) (int64, int64)
- func Lfind(key unsafe.Pointer, base unsafe.Pointer, nelp *uint64, width uint64, ...) unsafe.Pointer
- func Lgamma(x float64) float64
- func LgammaR(x float64, signgamp *int32) float64
- func Lgammaf(x float32) float32
- func LgammafR(x float32, signgamp *int32) float32
- func Link(from *byte, to *byte) int32
- func Llabs(a int64) int64
- func Lldiv(num int64, den int64) (int64, int64)
- func Llrint(x float64) int64
- func Llrintf(x float32) int64
- func Llround(x float64) int64
- func Llroundf(x float32) int64
- func Localeconv() *lconv
- func Localtime(t *int64) *tm
- func LocaltimeR(t *int64, tm *tm) *tm
- func Lockf(fd int32, op int32, size int64) int32
- func Log(x float64) float64
- func Log1p(x float64) float64
- func Log1pf(x float32) float32
- func Log2(x float64) float64
- func Log2f(x float32) float32
- func Log10(x float64) float64
- func Log10f(x float32) float32
- func Logb(x float64) float64
- func Logbf(x float32) float32
- func Logf(x float32) float32
- func Lrand48() int64
- func Lrint(x float64) int64
- func Lrintf(x float32) int64
- func Lround(x float64) int64
- func Lroundf(x float32) int64
- func Lsearch(key unsafe.Pointer, base unsafe.Pointer, nelp *uint64, width uint64, ...) unsafe.Pointer
- func Lseek(fd int32, off int64, whence int32) int64
- func Lstat(path *byte, buf *stat) int32
- func Malloc(nbytes uint64) unsafe.Pointer
- func Mblen(s *byte, n uint64) int32
- func Mbrlen(s *byte, n uint64, st *__mbstate_t) uint64
- func Mbrtoc16(pc16 *uint16, s *byte, n uint64, ps *__mbstate_t) uint64
- func Mbrtoc32(pc32 *uint32, s *byte, n uint64, ps *__mbstate_t) uint64
- func Mbrtowc(wc *int32, src *byte, n uint64, st *__mbstate_t) uint64
- func Mbsinit(st *__mbstate_t) int32
- func Mbsnrtowcs(wcs *int32, src **byte, n uint64, wn uint64, st *__mbstate_t) uint64
- func Mbsrtowcs(ws *int32, src **byte, wn uint64, st *__mbstate_t) uint64
- func Mbstowcs(ws *int32, s *byte, wn uint64) uint64
- func Mbtowc(wc *int32, src *byte, n uint64) int32
- func Memccpy(dest unsafe.Pointer, src unsafe.Pointer, c int32, n uint64) unsafe.Pointer
- func Memchr(src unsafe.Pointer, c int32, n uint64) unsafe.Pointer
- func Memcmp(vl unsafe.Pointer, vr unsafe.Pointer, n uint64) int32
- func Memcpy(dest unsafe.Pointer, src unsafe.Pointer, n uint64) unsafe.Pointer
- func Memmem(h0 unsafe.Pointer, k uint64, n0 unsafe.Pointer, l uint64) unsafe.Pointer
- func Memmove(dest unsafe.Pointer, src unsafe.Pointer, n uint64) unsafe.Pointer
- func Mempcpy(dest unsafe.Pointer, src unsafe.Pointer, n uint64) unsafe.Pointer
- func Memrchr(m unsafe.Pointer, c int32, n uint64) unsafe.Pointer
- func Memset(dest unsafe.Pointer, c int32, n uint64) unsafe.Pointer
- func Mkdir(path *byte, mode uint32) int32
- func Mkdirat(dirfd int32, path *byte, mode uint32) int32
- func Mkdtemp(template *byte) *byte
- func Mkfifo(path *byte, mode uint32) int32
- func Mkstemp(template *byte) int32
- func Mkstemps(template *byte, suffixlen int32) int32
- func Mktime(tm *tm) int64
- func Modf(x float64, iptr *float64) float64
- func Modff(x float32, iptr *float32) float32
- func Mrand48() int64
- func Nan(s *byte) float64
- func Nanf(s *byte) float32
- func Nanosleep(req *timespec, rem *timespec) int32
- func Nearbyint(x float64) float64
- func Nearbyintf(x float32) float32
- func Newlocale(mask int32, name *byte, base *__locale_struct) *__locale_struct
- func Nextafter(x float64, y float64) float64
- func Nextafterf(x float32, y float32) float32
- func Nexttoward(x float64, y float64) float64
- func Nexttowardf(x float32, y float64) float32
- func Nftw(path *byte, fn uintptr, fd_limit int32, flags int32) int32
- func Ngettext(msgid1 *byte, msgid2 *byte, n uint64) *byte
- func NlLanginfo(item int32) *byte
- func NlLanginfoL(item int32, loc *__locale_struct) *byte
- func Nrand48(s *uint16) int64
- func Open(path *byte, flags int32, argptrs unsafe.Pointer) int32
- func Openat(dirfd int32, path *byte, flags int32, argptrs unsafe.Pointer) int32
- func Opendir(name *byte) *__dirstream
- func Pclose(f *FILE) int32
- func Perror(msg *byte)
- func Pipe(fds *int32) int32
- func Pipe2(fds *int32, flags int32) int32
- func PosixFallocate(fd int32, off int64, len int64) int32
- func PosixMemalign(res *unsafe.Pointer, align uint64, len uint64) int32
- func Pow(x float64, y float64) float64
- func Pow10(x float64) float64
- func Powf(x float32, y float32) float32
- func Pread(fd int32, buf unsafe.Pointer, n uint64, off int64) int64
- func Printf(fmt *byte, argptrs unsafe.Pointer) int32
- func Psignal(sig int32, msg *byte)
- func PthreadAtfork(prepare uintptr, parent uintptr, child uintptr) int32
- func PthreadAttrDestroy(attr unsafe.Pointer) int32
- func PthreadAttrInit(attr unsafe.Pointer) int32
- func PthreadAttrSetDetachState(attr unsafe.Pointer, state int32) int32
- func PthreadAttrSetStackSize(attr unsafe.Pointer, size uintptr) int32
- func PthreadCondBroadcast(c unsafe.Pointer) int32
- func PthreadCondDestroy(c unsafe.Pointer) int32
- func PthreadCondInit(c, attr unsafe.Pointer) int32
- func PthreadCondSignal(c unsafe.Pointer) int32
- func PthreadCondTimedwait(c, m, abstime unsafe.Pointer) int32
- func PthreadCondWait(c, m unsafe.Pointer) int32
- func PthreadCondattrDestroy(a *pthread_condattr_t) int32
- func PthreadCondattrInit(a *pthread_condattr_t) int32
- func PthreadCreate(thread, attr, start, arg unsafe.Pointer) int32
- func PthreadDetach(t uint64) int32
- func PthreadEqual(a, b uint64) int32
- func PthreadExit(retval unsafe.Pointer)
- func PthreadGetSpecific(key keyID) unsafe.Pointer
- func PthreadJoin(t uint64, retval unsafe.Pointer) int32
- func PthreadKeyCreate(key *keyID, destructor unsafe.Pointer) int32
- func PthreadKeyDelete(key keyID) int32
- func PthreadMutexAttrSetType(a unsafe.Pointer, typ int32) int32
- func PthreadMutexDestroy(m unsafe.Pointer) int32
- func PthreadMutexInit(m, attr unsafe.Pointer) int32
- func PthreadMutexLock(m unsafe.Pointer) int32
- func PthreadMutexTimedlock(m, abstime unsafe.Pointer) int32
- func PthreadMutexTryLock(m unsafe.Pointer) int32
- func PthreadMutexUnlock(m unsafe.Pointer) int32
- func PthreadMutexattrDestroy(a *pthread_mutexattr_t) int32
- func PthreadMutexattrGettype(a *pthread_mutexattr_t, typ *int32) int32
- func PthreadMutexattrInit(a *pthread_mutexattr_t) int32
- func PthreadMutexattrSettype(a *pthread_mutexattr_t, typ int32) int32
- func PthreadOnce(once, initRoutine unsafe.Pointer) int32
- func PthreadRWLockDestroy(rwl unsafe.Pointer) int32
- func PthreadRWLockInit(rwl, attr unsafe.Pointer) int32
- func PthreadRWLockRdlock(rwl unsafe.Pointer) int32
- func PthreadRWLockUnlock(rwl unsafe.Pointer) int32
- func PthreadRWLockWrlock(rwl unsafe.Pointer) int32
- func PthreadRwlockTryrdlock(rw unsafe.Pointer) int32
- func PthreadRwlockTrywrlock(rw unsafe.Pointer) int32
- func PthreadRwlockattrDestroy(a *pthread_rwlockattr_t) int32
- func PthreadRwlockattrInit(a *pthread_rwlockattr_t) int32
- func PthreadSelf() uint64
- func PthreadSetSpecific(key keyID, value unsafe.Pointer) int32
- func PthreadYield() int32
- func Putc(c int32, f *FILE) int32
- func Putchar(c int32) int32
- func Putenv(s *byte) int32
- func Puts(s *byte) int32
- func Putw(x int32, f *FILE) int32
- func Putwc(c int32, f *FILE) uint32
- func Putwchar(c int32) uint32
- func Pwrite(fd int32, buf unsafe.Pointer, n uint64, off int64) int64
- func Qsort(base unsafe.Pointer, nel uint64, width uint64, cmp uintptr)
- func QsortR(base unsafe.Pointer, nel uint64, width uint64, cmp uintptr, arg unsafe.Pointer)
- func QuickExit(code int32)
- func Raise(sig int32) int32
- func Rand() int32
- func RandR(seed *uint32) int32
- func Random() int64
- func Read(fd int32, buf unsafe.Pointer, n uint64) int64
- func Readdir(d *__dirstream) *dirent
- func ReaddirR(d *__dirstream, entry *dirent, result **dirent) int32
- func Readlink(path *byte, buf *byte, bufsiz uint64) int64
- func Readv(fd int32, iov *iovec, iovcnt int32) int64
- func Realloc(ap unsafe.Pointer, nbytes uint64) unsafe.Pointer
- func Reallocarray(ptr unsafe.Pointer, m uint64, n uint64) unsafe.Pointer
- func Realpath(path *byte, resolved_path *byte) *byte
- func Regcomp(preg *re_pattern_buffer, regex *byte, cflags int32) int32
- func Regerror(e int32, preg *re_pattern_buffer, buf *byte, size uint64) uint64
- func Regexec(preg *re_pattern_buffer, string *byte, nmatch uint64, pmatch *regmatch_t, ...) int32
- func Regfree(preg *re_pattern_buffer)
- func Remainder(x float64, y float64) float64
- func Remainderf(x float32, y float32) float32
- func Remove(path *byte) int32
- func Remque(element unsafe.Pointer)
- func Remquo(x float64, y float64, quo *int32) float64
- func Remquof(x float32, y float32, quo *int32) float32
- func Rename(from *byte, to *byte) int32
- func Renameat(fromfd int32, from *byte, tofd int32, to *byte) int32
- func Rewind(f *FILE)
- func Rewinddir(d *__dirstream)
- func Rint(x float64) float64
- func Rintf(x float32) float32
- func Rmdir(path *byte) int32
- func Round(x float64) float64
- func Roundf(x float32) float32
- func Scalbln(x float64, n int64) float64
- func Scalblnf(x float32, n int64) float32
- func Scalbn(x float64, n int32) float64
- func Scalbnf(x float32, n int32) float32
- func Scandir(path *byte, res ***dirent, sel uintptr, cmp uintptr) int32
- func Scanf(fmt *byte, argptrs unsafe.Pointer) int32
- func Seed48(s *uint16) *uint16
- func SemDestroy(s unsafe.Pointer) int32
- func SemGetvalue(s, out unsafe.Pointer) int32
- func SemInit(s unsafe.Pointer, pshared int32, value uint32) int32
- func SemPost(s unsafe.Pointer) int32
- func SemTimedwait(s, abstime unsafe.Pointer) int32
- func SemTrywait(s unsafe.Pointer) int32
- func SemWait(s unsafe.Pointer) int32
- func Setbuf(f *FILE, buf *byte)
- func Setbuffer(f *FILE, buf *byte, size uint64)
- func Setenv(name, value *byte, overwrite int32) int32
- func Setlinebuf(f *FILE)
- func Setlocale(cat int32, name *byte) *byte
- func Setstate(state *byte) *byte
- func Setvbuf(f *FILE, buf *byte, mode int32, size uint64) int32
- func Sigaction(sig int32, act *sigaction, old *sigaction) int32
- func Sigaddset(set *uint64, sig int32) int32
- func Sigdelset(set *uint64, sig int32) int32
- func Sigemptyset(set *uint64) int32
- func Sigfillset(set *uint64) int32
- func Sigismember(set *uint64, sig int32) int32
- func Signal(sig int32, h uintptr) uintptr
- func Sin(x float64) float64
- func Sincos(x float64, sin *float64, cos *float64)
- func Sincosf(x float32, sin *float32, cos *float32)
- func Sinf(x float32) float32
- func Sinh(x float64) float64
- func Sinhf(x float32) float32
- func Sleep(seconds uint32) uint32
- func Snprintf(s *byte, n uint64, fmt *byte, argptrs unsafe.Pointer) int32
- func SnprintfProbe(buf *byte, n int32, depth int32) int32
- func Sprintf(s *byte, fmt *byte, argptrs unsafe.Pointer) int32
- func Sqrt(x float64) float64
- func Sqrtf(x float32) float32
- func Srand(s uint32)
- func Srand48(seed int64)
- func Srandom(seed uint32)
- func Sscanf(s *byte, fmt *byte, argptrs unsafe.Pointer) int32
- func Stat(path *byte, buf *stat) int32
- func Stpcpy(d *byte, s *byte) *byte
- func Stpncpy(d *byte, s *byte, n uint64) *byte
- func Strcasecmp(_l *byte, _r *byte) int32
- func StrcasecmpL(l *byte, r *byte, loc *__locale_struct) int32
- func Strcasestr(h *byte, n *byte) *byte
- func Strcat(dest *byte, src *byte) *byte
- func Strchr(s *byte, c int32) *byte
- func Strchrnul(s *byte, c int32) *byte
- func Strcmp(l *byte, r *byte) int32
- func Strcoll(l *byte, r *byte) int32
- func StrcollL(l *byte, r *byte, loc *__locale_struct) int32
- func Strcpy(dest *byte, src *byte) *byte
- func Strcspn(s *byte, c *byte) uint64
- func Strdup(s *byte) *byte
- func Strerror(e int32) *byte
- func StrerrorL(e int32, loc *__locale_struct) *byte
- func StrerrorR(err int32, buf *byte, buflen uint64) int32
- func Strfmon(s *byte, n uint64, fmt *byte, argptrs unsafe.Pointer) int64
- func StrfmonL(s *byte, n uint64, loc *__locale_struct, fmt *byte, argptrs unsafe.Pointer) int64
- func Strftime(s *byte, n uint64, f *byte, tm *tm) uint64
- func StrftimeL(s *byte, n uint64, f *byte, tm *tm, loc *__locale_struct) uint64
- func Strlcat(d *byte, s *byte, n uint64) uint64
- func Strlcpy(d *byte, s *byte, n uint64) uint64
- func Strlen(s *byte) uint64
- func Strncasecmp(_l *byte, _r *byte, n uint64) int32
- func StrncasecmpL(l *byte, r *byte, n uint64, loc *__locale_struct) int32
- func Strncat(d *byte, s *byte, n uint64) *byte
- func Strncmp(_l *byte, _r *byte, n uint64) int32
- func Strncpy(d *byte, s *byte, n uint64) *byte
- func Strndup(s *byte, n uint64) *byte
- func Strnlen(s *byte, n uint64) uint64
- func Strpbrk(s *byte, b *byte) *byte
- func Strptime(s *byte, f *byte, tm *tm) *byte
- func Strrchr(s *byte, c int32) *byte
- func Strsep(str **byte, sep *byte) *byte
- func Strsignal(signum int32) *byte
- func Strspn(s *byte, c *byte) uint64
- func Strstr(h *byte, n *byte) *byte
- func Strtod(s *byte, p **byte) float64
- func StrtodL(s *byte, p **byte, l *__locale_struct) float64
- func Strtof(s *byte, p **byte) float32
- func StrtofL(s *byte, p **byte, l *__locale_struct) float32
- func Strtoimax(nptr *byte, endptr **byte, base int32) int64
- func Strtok(s *byte, sep *byte) *byte
- func StrtokR(s *byte, sep *byte, p **byte) *byte
- func Strtol(s *byte, p **byte, base int32) int64
- func Strtold(s *byte, p **byte) float64
- func StrtoldL(s *byte, p **byte, l *__locale_struct) float64
- func Strtoll(s *byte, p **byte, base int32) int64
- func Strtoul(s *byte, p **byte, base int32) uint64
- func Strtoull(s *byte, p **byte, base int32) uint64
- func Strtoumax(nptr *byte, endptr **byte, base int32) uint64
- func Strverscmp(l0 *byte, r0 *byte) int32
- func Strxfrm(dest *byte, src *byte, n uint64) uint64
- func StrxfrmL(dest *byte, src *byte, n uint64, loc *__locale_struct) uint64
- func SurrogateToUtf8(s *byte, hi uint32, lo uint32) uint64
- func Swab(_src unsafe.Pointer, _dest unsafe.Pointer, n int64)
- func Swprintf(s *int32, n uint64, fmt *int32, argptrs unsafe.Pointer) int32
- func Swscanf(s *int32, fmt *int32, argptrs unsafe.Pointer) int32
- func Symlink(target *byte, linkpath *byte) int32
- func Sync()
- func Sysconf(name int32) int64
- func System(command *byte) int32
- func Tan(x float64) float64
- func Tanf(x float32) float32
- func Tanh(x float64) float64
- func Tanhf(x float32) float32
- func Tcdrain(fd int32) int32
- func Tcflow(fd int32, action int32) int32
- func Tcflush(fd int32, queue int32) int32
- func Tcgetattr(fd int32, tio *termios) int32
- func Tcgetpgrp(fd int32) int32
- func Tcgetsid(fd int32) int32
- func Tcgetwinsize(fd int32, wsz *winsize) int32
- func Tcsendbreak(fd int32, dur int32) int32
- func Tcsetattr(fd int32, act int32, tio *termios) int32
- func Tcsetpgrp(fd int32, pgrp int32) int32
- func Tcsetwinsize(fd int32, wsz *winsize) int32
- func Tdelete(key unsafe.Pointer, rootp *unsafe.Pointer, cmp uintptr) unsafe.Pointer
- func Tdestroy(root unsafe.Pointer, freekey uintptr)
- func Textdomain(domainname *byte) *byte
- func Tfind(key unsafe.Pointer, rootp *unsafe.Pointer, cmp uintptr) unsafe.Pointer
- func Tgamma(x float64) float64
- func Tgammaf(x float32) float32
- func Time(t *int64) int64
- func Timegm(tm *tm) int64
- func TimespecGet(ts *timespec, base int32) int32
- func Toascii(c int32) int32
- func Tolower(c int32) int32
- func TolowerL(c int32, l *__locale_struct) int32
- func Toupper(c int32) int32
- func ToupperL(c int32, l *__locale_struct) int32
- func Towctrans(wc uint32, trans int32) uint32
- func TowctransL(c uint32, t int32, l *__locale_struct) uint32
- func Towlower(wc uint32) uint32
- func TowlowerL(c uint32, l *__locale_struct) uint32
- func Towupper(wc uint32) uint32
- func TowupperL(c uint32, l *__locale_struct) uint32
- func Trunc(x float64) float64
- func Truncate(path *byte, len int64) int32
- func Truncf(x float32) float32
- func Tsearch(key unsafe.Pointer, rootp *unsafe.Pointer, cmp uintptr) unsafe.Pointer
- func Twalk(root unsafe.Pointer, action uintptr)
- func Tzset()
- func Umask(mask uint32) uint32
- func Uname(uts *utsname) int32
- func Ungetc(c int32, f *FILE) int32
- func Ungetwc(c uint32, f *FILE) uint32
- func Unlink(path *byte) int32
- func Unlinkat(dirfd int32, path *byte, flags int32) int32
- func Unsetenv(name *byte) int32
- func Uselocale(loc *__locale_struct) *__locale_struct
- func Usleep(useconds uint32) int32
- func Utimensat(dirfd int32, path *byte, times *timespec, flags int32) int32
- func Utimes(path *byte, times *timeval) int32
- func Vasprintf(s **byte, fmt *byte, ap *__va_list_tag) int32
- func Vdprintf(fd int32, fmt *byte, ap *__va_list_tag) int32
- func Verr(status int32, fmt *byte, ap *__va_list_tag)
- func Verrx(status int32, fmt *byte, ap *__va_list_tag)
- func Versionsort(a **dirent, b **dirent) int32
- func Vfprintf(f *FILE, fmt *byte, ap *__va_list_tag) int32
- func Vfscanf(f *FILE, fmt *byte, ap *__va_list_tag) int32
- func Vfwprintf(f *FILE, fmt *int32, ap *__va_list_tag) int32
- func Vfwscanf(f *FILE, fmt *int32, ap *__va_list_tag) int32
- func Vprintf(fmt *byte, ap *__va_list_tag) int32
- func Vscanf(fmt *byte, ap *__va_list_tag) int32
- func Vsnprintf(s *byte, n uint64, fmt *byte, ap *__va_list_tag) int32
- func Vsprintf(s *byte, fmt *byte, ap *__va_list_tag) int32
- func Vsscanf(s *byte, fmt *byte, ap *__va_list_tag) int32
- func Vswprintf(s *int32, n uint64, fmt *int32, ap *__va_list_tag) int32
- func Vswscanf(s *int32, fmt *int32, ap *__va_list_tag) int32
- func Vwarn(fmt *byte, ap *__va_list_tag)
- func Vwarnx(fmt *byte, ap *__va_list_tag)
- func Vwprintf(fmt *int32, ap *__va_list_tag) int32
- func Vwscanf(fmt *int32, ap *__va_list_tag) int32
- func Warn(fmt *byte, argptrs unsafe.Pointer)
- func Warnx(fmt *byte, argptrs unsafe.Pointer)
- func Wcpcpy(d *int32, s *int32) *int32
- func Wcpncpy(d *int32, s *int32, n uint64) *int32
- func Wcrtomb(s *byte, wc int32, st *__mbstate_t) uint64
- func Wcscasecmp(l *int32, r *int32) int32
- func WcscasecmpL(l *int32, r *int32, locale *__locale_struct) int32
- func Wcscat(dest *int32, src *int32) *int32
- func Wcschr(s *int32, c int32) *int32
- func Wcscmp(l *int32, r *int32) int32
- func Wcscoll(l *int32, r *int32) int32
- func WcscollL(l *int32, r *int32, loc *__locale_struct) int32
- func Wcscpy(d *int32, s *int32) *int32
- func Wcscspn(s *int32, c *int32) uint64
- func Wcsdup(s *int32) *int32
- func Wcsftime(wcs *int32, n uint64, f *int32, tm *tm) uint64
- func WcsftimeL(wcs *int32, n uint64, f *int32, tm *tm, loc *__locale_struct) uint64
- func Wcslen(s *int32) uint64
- func Wcsncasecmp(l *int32, r *int32, n uint64) int32
- func WcsncasecmpL(l *int32, r *int32, n uint64, locale *__locale_struct) int32
- func Wcsncat(d *int32, s *int32, n uint64) *int32
- func Wcsncmp(l *int32, r *int32, n uint64) int32
- func Wcsncpy(d *int32, s *int32, n uint64) *int32
- func Wcsnlen(s *int32, n uint64) uint64
- func Wcsnrtombs(dst *byte, wcs **int32, wn uint64, n uint64, st *__mbstate_t) uint64
- func Wcspbrk(s *int32, b *int32) *int32
- func Wcsrchr(s *int32, c int32) *int32
- func Wcsrtombs(s *byte, ws **int32, n uint64, st *__mbstate_t) uint64
- func Wcsspn(s *int32, c *int32) uint64
- func Wcsstr(h *int32, n *int32) *int32
- func Wcstod(s *int32, p **int32) float64
- func Wcstof(s *int32, p **int32) float32
- func Wcstoimax(s *int32, p **int32, base int32) int64
- func Wcstok(s *int32, sep *int32, p **int32) *int32
- func Wcstol(s *int32, p **int32, base int32) int64
- func Wcstold(s *int32, p **int32) float64
- func Wcstoll(s *int32, p **int32, base int32) int64
- func Wcstombs(s *byte, ws *int32, n uint64) uint64
- func Wcstoul(s *int32, p **int32, base int32) uint64
- func Wcstoull(s *int32, p **int32, base int32) uint64
- func Wcstoumax(s *int32, p **int32, base int32) uint64
- func Wcswcs(haystack *int32, needle *int32) *int32
- func Wcswidth(wcs *int32, n uint64) int32
- func Wcsxfrm(dest *int32, src *int32, n uint64) uint64
- func WcsxfrmL(dest *int32, src *int32, n uint64, loc *__locale_struct) uint64
- func Wctob(c uint32) int32
- func Wctomb(s *byte, wc int32) int32
- func Wctrans(class *byte) int32
- func WctransL(s *byte, l *__locale_struct) int32
- func Wctype(s *byte) uint64
- func WctypeL(s *byte, l *__locale_struct) uint64
- func Wcwidth(wc int32) int32
- func Wmemchr(s *int32, c int32, n uint64) *int32
- func Wmemcmp(l *int32, r *int32, n uint64) int32
- func Wmemcpy(d *int32, s *int32, n uint64) *int32
- func Wmemmove(d *int32, s *int32, n uint64) *int32
- func Wmemset(d *int32, c int32, n uint64) *int32
- func Wprintf(fmt *int32, argptrs unsafe.Pointer) int32
- func Write(fd int32, buf unsafe.Pointer, n uint64) int64
- func Writev(fd int32, iov *iovec, iovcnt int32) int64
- func Wscanf(fmt *int32, argptrs unsafe.Pointer) int32
- func Y0(x float64) float64
- func Y1(x float64) float64
- func Yn(n int32, x float64) float64
- type FILE
- func C2goStdfile(which int32) *FILE
- func Fdopen(fd int32, mode *byte) *FILE
- func Fmemopen(buf unsafe.Pointer, size uint64, mode *byte) *FILE
- func Fopen(filename *byte, mode *byte) *FILE
- func Fopencookie(cookie unsafe.Pointer, mode *byte, iofuncs cookie_io_functions_t) *FILE
- func Freopen(filename *byte, mode *byte, f *FILE) *FILE
- func OpenMemstream(bufp **byte, sizep *uint64) *FILE
- func Popen(command *byte, mode *byte) *FILE
- func Tmpfile() *FILE
Constants ¶
const ( C2GoABIEpochMin = c2goabi.C2GoABIEpochMin C2GoABIEpochMax = c2goabi.C2GoABIEpochMax )
C2GoABIEpoch — the c2go-internal ABI generation (calling conventions, symbol / gcbitmap naming, manifest schema, managed model) this build of c2go-libc speaks. A c2go-clang-generated consumer package must emit an ABI epoch within [C2GoABIEpochMin, C2GoABIEpochMax]; the c2go-bind-generated c2go_abi_anchor.go enforces that at `go build` time via a const static assert (see c2go-bind main.go emitABIAnchor + docs/c2go/versioning.md). Bump only on an intentional ABI break.
Variables ¶
This section is empty.
Functions ¶
func AtQuickExit ¶
func BindTextdomainCodeset ¶
func Bindtextdomain ¶
func C2goFileRawClose ¶
func C2goFileRawFdopen ¶
func C2goFileRawFgetwc ¶
func C2goFileRawFmemopen ¶
func C2goFileRawFputwc ¶
func C2goFileRawFputws ¶
func C2goFileRawFwide ¶
func C2goFileRawOpen ¶
func C2goFileRawStdinit ¶
func C2goFileRawUngetwc ¶
func C2goFileRawVfwprintf ¶
func C2goFinalize ¶
func C2goFinalize()
func C2goPthreadRunDtor ¶
func C2goPthreadRunVoid ¶
func C2goPthreadRunVoid(fn uintptr)
func C2goSignalRun ¶
func C2goVsscanfManaged ¶
func C2goVswscanfManaged ¶
func Cfgetispeed ¶
func Cfgetispeed(tio *termios) uint32
func Cfgetospeed ¶
func Cfgetospeed(tio *termios) uint32
func Cfsetispeed ¶
func Cfsetospeed ¶
func Cfsetspeed ¶
func ClockGetres ¶
func ClockGettime ¶
func CtypeGetMbCurMax ¶
func CtypeGetMbCurMax() uint64
func Dcngettext ¶
func EnvironSync ¶
func EnvironSync()
func ExplicitBzero ¶
func Feclearexcept ¶
func Fegetround ¶
func Fegetround() int32
func Feraiseexcept ¶
func Fesetround ¶
func Fetestexcept ¶
func Freelocale ¶
func Freelocale(loc *__locale_struct)
func Ftrylockfile ¶
func Funlockfile ¶
func Funlockfile(f *FILE)
func GCMalloc ¶
GCMalloc is the typed GC allocation entry (C: gc_malloc). It allocates at least `n` zeroed bytes on the Go heap, tracked per `typeInfo` (a *runtime._type; null = noscan blob). needzero is always true so the GC never scans stale heap garbage before the caller's first store.
NOT //go:nosplit: runtime.mallocgc grows the stack and may trigger a GC, so GCMalloc must be an ordinary preemptible, stack-checked Go function.
func Gethostname ¶
func GetoptLong ¶
func GetoptLongOnly ¶
func Getpagesize ¶
func Getpagesize() int32
func Getpid ¶
func Getpid() int32
Getpid implements getpid() (pid_t == int32). os.Getpid is cross-platform, so it lives here rather than in the Unix-only process_unix.go.
func Gettimeofday ¶
func IconvClose ¶
func IconvOpen ¶
IconvOpen returns the REAL *iconvState pointer, or nil on failure. The POSIX (iconv_t)-1 failure sentinel exists ONLY in the C world: the C wrapper (source/iconv.c) maps nil→-1 and screens -1 back out — a manufactured non-pointer value must never live in a Go pointer slot (a prior integer-handle design parked id 1 / ^0 in unsafe.Pointer stack slots and the precise stack scan threw "invalid pointer found on stack").
func IswxdigitL ¶
func Kill ¶
Kill implements kill(pid, sig) (#675). kill(pid, 0) is the existence probe; in-process self-signalling should use raise() (the Go-side dispatcher), so this bridge matters for real cross-process signals and probes.
func Localeconv ¶
func Localeconv() *lconv
func LocaltimeR ¶
func LocaltimeR(t *int64, tm *tm) *tm
func Mbsnrtowcs ¶
func Nearbyintf ¶
func Nextafterf ¶
func Nexttoward ¶
func Nexttowardf ¶
func NlLanginfo ¶
func NlLanginfoL ¶
func PthreadAttrDestroy ¶
func PthreadAttrInit ¶
func PthreadAttrSetStackSize ¶
func PthreadCondBroadcast ¶
func PthreadCondDestroy ¶
func PthreadCondInit ¶
func PthreadCondSignal ¶
func PthreadCondTimedwait ¶
func PthreadCondWait ¶
func PthreadCondattrDestroy ¶
func PthreadCondattrDestroy(a *pthread_condattr_t) int32
func PthreadCondattrInit ¶
func PthreadCondattrInit(a *pthread_condattr_t) int32
func PthreadCreate ¶
func PthreadDetach ¶
func PthreadEqual ¶
func PthreadExit ¶
func PthreadGetSpecific ¶
func PthreadKeyCreate ¶
func PthreadKeyDelete ¶
func PthreadKeyDelete(key keyID) int32
func PthreadMutexDestroy ¶
func PthreadMutexInit ¶
func PthreadMutexLock ¶
func PthreadMutexTimedlock ¶
func PthreadMutexTryLock ¶
func PthreadMutexUnlock ¶
func PthreadMutexattrDestroy ¶
func PthreadMutexattrDestroy(a *pthread_mutexattr_t) int32
func PthreadMutexattrGettype ¶
func PthreadMutexattrInit ¶
func PthreadMutexattrInit(a *pthread_mutexattr_t) int32
func PthreadMutexattrSettype ¶
func PthreadOnce ¶
func PthreadRWLockDestroy ¶
func PthreadRWLockInit ¶
func PthreadRWLockRdlock ¶
func PthreadRWLockUnlock ¶
func PthreadRWLockWrlock ¶
func PthreadRwlockTryrdlock ¶
func PthreadRwlockTrywrlock ¶
func PthreadRwlockattrDestroy ¶
func PthreadRwlockattrDestroy(a *pthread_rwlockattr_t) int32
func PthreadRwlockattrInit ¶
func PthreadRwlockattrInit(a *pthread_rwlockattr_t) int32
func PthreadSelf ¶
func PthreadSelf() uint64
func PthreadSetSpecific ¶
func PthreadYield ¶
func PthreadYield() int32
func Remainderf ¶
func SemDestroy ¶
func SemGetvalue ¶
func SemTimedwait ¶
func SemTrywait ¶
func Setlinebuf ¶
func Setlinebuf(f *FILE)
func Sigemptyset ¶
func Sigfillset ¶
func Sigismember ¶
func Strcasecmp ¶
func StrcasecmpL ¶
func Strcasestr ¶
func Strverscmp ¶
func Tcgetwinsize ¶
func Tcsendbreak ¶
func Tcsetwinsize ¶
func Textdomain ¶
func TimespecGet ¶
func TowctransL ¶
func Versionsort ¶
func Versionsort(a **dirent, b **dirent) int32
func Wcscasecmp ¶
func WcscasecmpL ¶
func Wcsnrtombs ¶
Types ¶
type FILE ¶
type FILE = _c2go_FILE
FILE is the exported public alias for the opaque handle. A downstream c2go package that only forward-declares FILE (via <stdio.h>'s `typedef struct _c2go_FILE FILE;`) cannot name the unexported `_c2go_FILE`, so c2go-bind qualifies `*_c2go_FILE` → `*libc.FILE` in its generated bindings (see libcTypeRefs). The alias makes those pointers type-identical to what Fopen/Fwrite/Fclose/… return and accept here.
func C2goStdfile ¶
func Fopencookie ¶
func OpenMemstream ¶
Source Files
¶
- c2go_abi_anchor.go
- conf_bridge.go
- cstr.go
- dirent.go
- dirent_unix.go
- errno.go
- errno_unix.go
- fallocate_linux.go
- fd_alloc_unix.go
- fdpath_linux.go
- flock.go
- fsops.go
- fsops_linux.go
- futimens_linux.go
- gc_malloc.go
- gc_writebarrier.go
- gls.go
- handle.go
- iconv.go
- io.go
- io_linux.go
- ioctl_unix.go
- libc_linux_amd64.go
- malloc.go
- pipe2_linux.go
- popen.go
- popen_unix.go
- process.go
- process_unix.go
- pthread.go
- pthread_key.go
- raise_linux.go
- resource_unix.go
- sem.go
- signal.go
- sjlj.go
- stat.go
- stat_linux.go
- stat_types.go
- stdio.go
- stdio_std.go
- stdio_std_unix.go
- system_unix.go
- thread.go
- time.go
- times_unix.go
- tmpdir.go
- uname_linux.go
- uname_unix.go
- unistd_shim_unix.go
- version.go
- wctype.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package c2goabi publishes the compile-time contracts shared by C2Go-generated packages, c2go-libc, and the active Go toolchain.
|
Package c2goabi publishes the compile-time contracts shared by C2Go-generated packages, c2go-libc, and the active Go toolchain. |
|
Package dl implements the external native-call boundary for c2go `unmanaged extern` symbols.
|
Package dl implements the external native-call boundary for c2go `unmanaged extern` symbols. |
|
internal
|
|
|
finalize
Package finalize coordinates package-local cleanup that must run from the C2Go C exit path.
|
Package finalize coordinates package-local cleanup that must run from the C2Go C exit path. |
|
posixdir
Package posixdir contains the Go-owned state and stateless record filling shared by libc's handle-based DIR carrier and mlib's direct-pointer carrier.
|
Package posixdir contains the Go-owned state and stateless record filling shared by libc's handle-based DIR carrier and mlib's direct-pointer carrier. |
|
posixstdio
Package posixstdio contains state shared by the unmanaged and managed FILE carriers.
|
Package posixstdio contains state shared by the unmanaged and managed FILE carriers. |
|
posixsync
Package posixsync contains state algorithms shared by the unmanaged libc carriers and the managed mlib carriers.
|
Package posixsync contains state algorithms shared by the unmanaged libc carriers and the managed mlib carriers. |
|
Package mlib implements managed variants of stateful libc APIs.
|
Package mlib implements managed variants of stateful libc APIs. |