libc

package module
v1.50.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2024 License: BSD-3-Clause Imports: 27 Imported by: 147

README

libc

Package libc provides C-runtime services. Work in progress.

This package is a continuation of the Crt package in modernc.org/crt/v3.

Installation

$ go get [-u] modernc.org/libc

Documentation: godoc.org/modernc.org/libc

Building with make requires the following Go packages

  • github.com/golang/lint/golint
  • github.com/mdempsky/maligned
  • github.com/mdempsky/unconvert
  • honnef.co/go/tools/cmd/unused
  • honnef.co/go/tools/cmd/gosimple
  • github.com/client9/misspell/cmd/misspell

Documentation

Overview

Package libc provides run time support for programs generated by the ccgo C to Go transpiler, version 4 or later.

Concurrency

Many C libc functions are not thread safe. Such functions are not safe for concurrent use by multiple goroutines in the Go translation as well.

Thread Local Storage

C threads are modeled as Go goroutines. Every such C thread, ie. a Go goroutine, must use its own Thread Local Storage instance implemented by the TLS type.

Signals

Signal handling in translated C code is not coordinated with the Go runtime. This is probably the same as when running C code via CGo.

Environmental variables

This package synchronizes its environ with the current Go environ lazily and only once.

From Linux man-pages Copyleft

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Since the Linux kernel and libraries are constantly changing, this
manual page may be incorrect or out-of-date. The author(s) assume no
responsibility for errors or omissions, or for damages resulting from
the use of the information contained herein. The author(s) may not have
taken the same level of care in the production of this manual, which is
licensed free of charge, as they might when working professionally.

Formatted or processed versions of this manual, if unaccompanied by the
source, must acknowledge the copyright and authors of this work.

Index