f8d9fa9e80
This upgrades all of libgo other than the runtime package to the Go 1.4 release. In Go 1.4 much of the runtime was rewritten into Go. Merging that code will take more time and will not change the API, so I'm putting it off for now. There are a few runtime changes anyhow, to accomodate other packages that rely on minor modifications to the runtime support. The compiler changes slightly to add a one-bit flag to each type descriptor kind that is stored directly in an interface, which for gccgo is currently only pointer types. Another one-bit flag (gcprog) is reserved because it is used by the gc compiler, but gccgo does not currently use it. There is another error check in the compiler since I ran across it during testing. gotools/: * Makefile.am (go_cmd_go_files): Sort entries. Add generate.go. * Makefile.in: Rebuild. From-SVN: r219627
40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
// Copyright 2014 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"
|
|
|
|
func nacl_exception_stack(p unsafe.Pointer, size int32) int32
|
|
func nacl_exception_handler(fn, arg unsafe.Pointer) int32
|
|
func nacl_sem_create(flag int32) int32
|
|
func nacl_sem_wait(sem int32) int32
|
|
func nacl_sem_post(sem int32) int32
|
|
func nacl_mutex_create(flag int32) int32
|
|
func nacl_mutex_lock(mutex int32) int32
|
|
func nacl_mutex_trylock(mutex int32) int32
|
|
func nacl_mutex_unlock(mutex int32) int32
|
|
func nacl_cond_create(flag int32) int32
|
|
func nacl_cond_wait(cond, n int32) int32
|
|
func nacl_cond_signal(cond int32) int32
|
|
func nacl_cond_broadcast(cond int32) int32
|
|
func nacl_cond_timed_wait_abs(cond, lock int32, ts unsafe.Pointer) int32
|
|
func nacl_thread_create(fn, stk, tls, xx unsafe.Pointer) int32
|
|
func nacl_nanosleep(ts, extra unsafe.Pointer) int32
|
|
|
|
func os_sigpipe() {
|
|
gothrow("too many writes on closed pipe")
|
|
}
|
|
|
|
func sigpanic() {
|
|
g := getg()
|
|
if !canpanic(g) {
|
|
gothrow("unexpected signal during runtime execution")
|
|
}
|
|
|
|
// Native Client only invokes the exception handler for memory faults.
|
|
g.sig = _SIGSEGV
|
|
panicmem()
|
|
}
|