code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "bytes" "fmt" "strconv" "strings" "time" ) // This implementation is done according to RFC 6265: // // http://tools.ietf.org/htm...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // HTTP file system request handler package http import ( "errors" "fmt" "io" "mime" "os" "path" "path/filepath" "strconv" "strings" "time" ) // A ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package httptest provides utilities for HTTP testing. package httptest import ( "bytes" "net/http" ) // ResponseRecorder is an implementation of http.Res...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Implementation of Server package httptest import ( "crypto/tls" "flag" "fmt" "net" "net/http" "os" "sync" ) // A Server is an HTTP server listening...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package pprof serves via its HTTP server runtime profiling data // in the format expected by the pprof visualization tool. // For more information about ppr...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The wire protocol for HTTP's "chunked" Transfer-Encoding. // This code is duplicated in httputil/chunked.go. // Please make any changes in both files. pack...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "net/url" ) // A CookieJar manages storage and use of cookies in HTTP requests. // // Implementations of CookieJar must be safe for co...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "bufio" "bytes" "errors" "fmt" "io" "io/ioutil" "net/textproto" "strconv" "strings" ) // transferWriter inspects the fields of ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // HTTP server. See RFC 2616. // TODO(rsc): // logging package http import ( "bufio" "bytes" "crypto/tls" "errors" "fmt" "io" "io/ioutil" "log" "ne...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fcgi // This file implements FastCGI from the perspective of a child process. import ( "errors" "fmt" "io" "net" "net/http" "net/http/cgi" "os"...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package fcgi implements the FastCGI protocol. // Currently only the responder role is supported. // The protocol is defined at http://www.fastcgi.com/drupal/...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package httputil provides HTTP utility functions, complementing the // more common ones in the net/http package. package httputil import ( "bufio" "errors...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package httputil import ( "bufio" "bytes" "fmt" "io" "io/ioutil" "net" "net/http" "net/url" "strings" "time" ) // One of the copies, say from b to r...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The wire protocol for HTTP's "chunked" Transfer-Encoding. // This code is a duplicate of ../chunked.go with these edits: // s/newChunked/NewChunked/g // s/p...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // HTTP reverse proxy handler package httputil import ( "io" "log" "net" "net/http" "net/url" "strings" "sync" "time" ) // onExitFlushLoop is a callb...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http // HTTP status codes, defined in RFC 2616. const ( StatusContinue = 100 StatusSwitchingProtocols = 101 StatusOK = ...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "io" "net/textproto" "sort" "strings" ) // A Header represents the key-value pairs in an HTTP header. type Header map[string][]stri...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements CGI from the perspective of a child // process. package cgi import ( "bufio" "crypto/tls" "errors" "fmt" "io" "io/ioutil" "net"...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements the host side of CGI (being the webserver // parent process). // Package cgi implements CGI (Common Gateway Interface) as specified // ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // HTTP Request reading and parsing. package http import ( "bufio" "bytes" "crypto/tls" "encoding/base64" "errors" "fmt" "io" "io/ioutil" "mime" "mi...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http // This file deals with lexical matters of HTTP var isTokenTable = [127]bool{ '!': true, '#': true, '$': true, '%': true, '&': true, '...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "fmt" "io" ) // fileTransport implements RoundTripper for the 'file' protocol. type fileTransport struct { fh fileHandler } // NewFi...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package http provides HTTP client and server implementations. Get, Head, Post, and PostForm make HTTP requests: resp, err := http.Get("http://example.com/...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // TCP for Plan 9 package net import ( "syscall" "time" ) // TCPConn is an implementation of the Conn interface // for TCP network connections. type TCPCo...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Waiting for FDs via kqueue/kevent. package net import ( "errors" "os" "syscall" ) type pollster struct { kq int eventbuf [10]syscall.Kevent_t ...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "errors" "io" "time" ) // Pipe creates a synchronous, in-memory, full duplex // network connection; both ends implement the Conn inte...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Read static host/IP entries from /etc/hosts. package net import ( "sync" "time" ) const cacheMaxAge = 5 * time.Minute // hostsPath points to the file w...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Waiting for FDs via kqueue/kevent. package net import ( "os" "syscall" ) type pollster struct { kq int eventbuf [10]syscall.Kevent_t events [...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !cgo // Stub cgo routines for systems that do not use cgo to do network lookups. package net func cgoLookupHost(name string) (addrs []string, err ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Waiting for FDs via kqueue/kevent. package net import ( "os" "syscall" ) type pollster struct { kq int eventbuf [10]syscall.Kevent_t events [...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd windows // (Raw) IP sockets package net import ( "syscall" ) func sockaddrToIP(sa syscall.Sockaddr) Addr { ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Simple file i/o and string manipulation, to avoid // depending on strconv and bufio and strings. package net import ( "io" "os" ) type file struct { fi...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd netbsd openbsd // Socket options for BSD variants package net import ( "os" "syscall" ) func setDefaultSockopts(s, f, t int, ipv...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // (Raw) IP sockets package net // IPAddr represents the address of a IP end point. type IPAddr struct { IP IP } // Network returns the address's network n...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd windows // TCP sockets package net import ( "io" "os" "syscall" "time" ) // BUG(rsc): On OpenBSD, listeni...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd windows // IP-level socket options package net import ( "os" "syscall" ) func ipv4TOS(fd *netFD) (int, erro...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "errors" "os" "syscall" ) func query(filename, query string, bufSize int) (res []string, err error) { file, err := os.OpenFile(filen...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd // Read system port mappings from /etc/services package net import "sync" var services map[string]map[string]i...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "math/rand" "sort" ) // DNSError represents a DNS lookup error. type DNSError struct { Err string // description of the error N...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Network interface identification package net import "errors" var ( errInvalidInterface = errors.New("net: invalid interface") errInvalidInterfa...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package net provides a portable interface for network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets. Although the package prov...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Network interface identification for Linux package net import ( "os" "syscall" "unsafe" ) // If the ifindex is zero, interfaceTable returns mappings o...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Network interface identification for Windows package net import ( "os" "syscall" "unsafe" ) func bytePtrToString(p *uint8) string { a := (*[10000]uin...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // MAC address manipulations package net import "errors" const hexDigit = "0123456789abcdef" // A HardwareAddr represents a physical hardware address. type...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // IP-level socket options for Windows package net import ( "os" "syscall" ) func ipv4MulticastInterface(fd *netFD) (*Interface, error) { // TODO: Implem...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build plan9 // Network interface identification package net // If the ifindex is zero, interfaceTable returns mappings of all // network interfaces. Ot...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd windows // Socket options package net import ( "os" "syscall" "time" ) // Boolean to int. func boolint(b b...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Network interface identification for FreeBSD package net import ( "os" "syscall" ) // If the ifindex is zero, interfaceMulticastAddrTable returns // ad...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "errors" "io" "os" "runtime" "sync" "syscall" "time" "unsafe" ) var initErr error func init() { var d syscall.WSAData e := sys...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd windows package net import "syscall" // Should we try to use the IPv4 socket interface if we're // only dealin...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // IP-level socket options for NetBSD package net import "syscall" func ipv4MulticastInterface(fd *netFD) (*Interface, error) { // TODO: Implement this re...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net /* #include <netdb.h> */ import "C" func cgoAddrInfoMask() C.int { return C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL }
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net // LookupHost looks up the given host using the local resolver. // It returns an array of that host's addresses. func LookupHost(host string) (add...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Sockets for Linux package net import "syscall" func maxListenerBacklog() int { fd, err := open("/proc/sys/net/core/somaxconn") if err != nil { return...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // DNS packet assembly. See RFC 1035. // // This is intended to support name resolution during Dial. // It doesn't have to be blazing fast. // // Each message ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // UDP for Plan 9 package net import ( "errors" "os" "syscall" "time" ) // UDPConn is the implementation of the Conn and PacketConn // interfaces for UD...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd package net import ( "errors" "io" "os" "sync" "syscall" "time" ) // Network file descriptor. type netFD ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "os" "syscall" ) func FileConn(f *os.File) (c Conn, err error) { // TODO: Implement this return nil, os.NewSyscallError("FileConn", s...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Unix domain sockets stubs for Plan 9 package net import ( "syscall" "time" ) // UnixConn is an implementation of the Conn interface // for connections ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // IP address manipulations // // IPv4 addresses are 4 bytes; IPv6 addresses are 16 bytes. // An IPv4 address can be converted to an IPv6 address by // adding a...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Unix domain sockets package net // UnixAddr represents the address of a Unix domain socket end point. type UnixAddr struct { Name string Net string } ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package path implements utility routines for manipulating slash-separated // paths. package path import ( "strings" ) // Clean returns the shortest path n...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package filepath implements utility routines for manipulating filename paths // in a way compatible with the target operating system-defined file paths. pack...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package filepath import ( "errors" "os" "runtime" "sort" "strings" "unicode/utf8" ) // ErrBadPattern indicates a globbing pattern was malformed. var Err...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !windows package filepath import ( "bytes" "errors" "os" "strings" ) func evalSymlinks(path string) (string, error) { const maxIter = 255 ori...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin freebsd linux netbsd openbsd package filepath import "strings" // IsAbs returns true if the path is absolute. func IsAbs(path string) bool {...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package filepath import ( "syscall" ) func toShort(path string) (string, error) { p := syscall.StringToUTF16(path) b := p // GetShortPathName says we can r...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package filepath import "strings" // IsAbs returns true if the path is absolute. func IsAbs(path string) bool { return strings.HasPrefix(path, "/") || string...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package filepath import ( "strings" ) func isSlash(c uint8) bool { return c == '\\' || c == '/' } // IsAbs returns true if the path is absolute. func IsAbs...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package path import ( "errors" "strings" "unicode/utf8" ) // ErrBadPattern indicates a globbing pattern was malformed. var ErrBadPattern = errors.New("synt...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package utf16 implements encoding and decoding of UTF-16 sequences. package utf16 // The conditions replacementChar==unicode.ReplacementChar and // maxRune...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package unicode provides data and functions to test some properties of // Unicode code points. package unicode const ( MaxRune = '\U0010FFFF' // Ma...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package utf8 implements functions and constants to support text encoded in // UTF-8. It includes functions to translate between runes and UTF-8 byte sequence...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // TODO: This file contains the special casing rules for Turkish and Azeri only. // It should encompass all the languages with special casing rules // and be ge...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package unicode // IsDigit reports whether the rune is a decimal digit. func IsDigit(r rune) bool { if r <= MaxLatin1 { return '0' <= r && r <= '9' } retu...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package unicode // Bit masks for each code point under U+0100, for fast lookup. const ( pC = 1 << iota // a control character. pP // a punctuat...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Unicode table generator. // Data read from the web. package main import ( "bufio" "flag" "fmt" "io" "log" "net/http" "os" "path/f...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package cgo contains runtime support for code generated by the cgo tool. See the documentation for the cgo command for details on using cgo. */ package cgo...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime // Compiler is the name of the compiler toolchain that built the // running binary. Known toolchains are: // // gc The 5g/6g/8g compiler...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Repeated malloc test. package main import ( "flag" "fmt" "runtime" "strconv" ) var chatty = flag.Bool("v", false, "chatty") var reve...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Software IEEE754 64-bit floating point. // Only referred to (and thus linked in) by arm port // and by tests in this directory. package runtime const ( m...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package pprof writes runtime profiling data in the format expected // by the pprof visualization tool. // For more information about pprof, see // http://co...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 cgo -cdefs defs_darwin.go >defs_darwin_amd64.h GOARCH=386 cgo -cdefs defs_darwin.go >defs_darwin_386.h */ pack...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Random malloc test. package main import ( "flag" "math/rand" "runtime" "unsafe" ) var chatty = flag.Bool("v", false, "chatty") var ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime import "unsafe" // A MemStats records statistics about the memory allocator. type MemStats struct { // General statistics. Alloc uint64...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime // Breakpoint() executes a breakpoint trap. func Breakpoint() // LockOSThread wires the calling goroutine to its current operating system thre...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Repeated malloc test. // +build ignore package main import ( "flag" "runtime" ) var chatty = flag.Bool("v", false, "chatty") var oldsys uint64 var mem...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime // The Error interface identifies a run time error. type Error interface { error // RuntimeError is a no-op function but // serves to disti...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* * Runtime type representation. * This file exists only to provide types that 6l can turn into * DWARF information for use by gdb. Nothing else uses these...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo -cdefs GOARCH=amd64 cgo -cdefs defs.go defs1.go >amd64/defs.h */ package runtime /* #include <ucontext.h> #include <fcntl.h...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* * Input to cgo -cdefs GOARCH=386 cgo -cdefs defs2.go >386/defs.h The asm header tricks we have to use for Linux on amd64 (see defs.c and...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines. It also includes the low-level type in...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_openbsd.go >defs_openbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_openbsd.go >defs_op...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // trivial malloc test package main import ( "flag" "fmt" "runtime" ) var chatty = flag.Bool("v", false, "chatty") func main() { memst...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. On a Debian Lenny arm linux distribution: cgo -cdefs defs_arm.c >arm/defs.h */ package runtime /* #cgo CFLAGS: -I/usr/src/...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 cgo -cdefs defs.go >amd64/defs.h GOARCH=386 cgo -cdefs defs.go >386/defs.h */ package runtime /* #include <sy...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo -cdefs GOARCH=amd64 cgo -cdefs defs.go defs1.go >amd64/defs.h */ package runtime /* // Linux glibc and Linux kernel define ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go