2008-12-03 15:21:28 -07:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
#define C SigCatch
|
|
|
|
#define I SigIgnore
|
|
|
|
#define R SigRestart
|
2009-12-15 19:21:29 -07:00
|
|
|
#define Q SigQueue
|
2010-04-08 19:15:30 -06:00
|
|
|
#define P SigPanic
|
2008-12-03 15:21:28 -07:00
|
|
|
|
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries. The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.
The symbols left alone are:
** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall
** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab
** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)
Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.
Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.
R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 12:00:19 -06:00
|
|
|
SigTab runtime·sigtab[] = {
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 0 */ 0, "SIGNONE: no trap",
|
2009-12-15 19:21:29 -07:00
|
|
|
/* 1 */ Q+R, "SIGHUP: terminal line hangup",
|
|
|
|
/* 2 */ Q+R, "SIGINT: interrupt",
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 3 */ C, "SIGQUIT: quit",
|
2011-03-27 21:39:42 -06:00
|
|
|
/* 4 */ C+P, "SIGILL: illegal instruction",
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 5 */ C, "SIGTRAP: trace trap",
|
|
|
|
/* 6 */ C, "SIGABRT: abort",
|
2010-04-08 19:15:30 -06:00
|
|
|
/* 7 */ C+P, "SIGBUS: bus error",
|
|
|
|
/* 8 */ C+P, "SIGFPE: floating-point exception",
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 9 */ 0, "SIGKILL: kill",
|
2009-12-16 21:20:50 -07:00
|
|
|
/* 10 */ Q+I+R, "SIGUSR1: user-defined signal 1",
|
2010-04-08 19:15:30 -06:00
|
|
|
/* 11 */ C+P, "SIGSEGV: segmentation violation",
|
2009-12-16 21:20:50 -07:00
|
|
|
/* 12 */ Q+I+R, "SIGUSR2: user-defined signal 2",
|
2009-04-29 18:36:58 -06:00
|
|
|
/* 13 */ I, "SIGPIPE: write to broken pipe",
|
2009-12-16 21:20:50 -07:00
|
|
|
/* 14 */ Q+I+R, "SIGALRM: alarm clock",
|
2009-12-15 19:21:29 -07:00
|
|
|
/* 15 */ Q+R, "SIGTERM: termination",
|
2009-12-16 21:20:50 -07:00
|
|
|
/* 16 */ C, "SIGSTKFLT: stack fault",
|
2010-02-04 00:24:28 -07:00
|
|
|
/* 17 */ Q+I+R, "SIGCHLD: child status has changed",
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 18 */ 0, "SIGCONT: continue",
|
|
|
|
/* 19 */ 0, "SIGSTOP: stop, unblockable",
|
2009-12-16 21:20:50 -07:00
|
|
|
/* 20 */ Q+I+R, "SIGTSTP: keyboard stop",
|
|
|
|
/* 21 */ Q+I+R, "SIGTTIN: background read from tty",
|
|
|
|
/* 22 */ Q+I+R, "SIGTTOU: background write to tty",
|
|
|
|
/* 23 */ Q+I+R, "SIGURG: urgent condition on socket",
|
|
|
|
/* 24 */ Q+I+R, "SIGXCPU: cpu limit exceeded",
|
|
|
|
/* 25 */ Q+I+R, "SIGXFSZ: file size limit exceeded",
|
|
|
|
/* 26 */ Q+I+R, "SIGVTALRM: virtual alarm clock",
|
|
|
|
/* 27 */ Q+I+R, "SIGPROF: profiling alarm clock",
|
|
|
|
/* 28 */ Q+I+R, "SIGWINCH: window size change",
|
|
|
|
/* 29 */ Q+I+R, "SIGIO: i/o now possible",
|
|
|
|
/* 30 */ Q+I+R, "SIGPWR: power failure restart",
|
2008-12-03 15:21:28 -07:00
|
|
|
/* 31 */ C, "SIGSYS: bad system call",
|
|
|
|
};
|
|
|
|
#undef C
|
|
|
|
#undef I
|
|
|
|
#undef R
|
2009-12-15 19:21:29 -07:00
|
|
|
#undef Q
|
2010-04-08 19:15:30 -06:00
|
|
|
#undef P
|
2008-12-03 15:21:28 -07:00
|
|
|
|
|
|
|
#define NSIG 32
|