diff options
Diffstat (limited to 'libgo/runtime/signal_unix.h')
-rw-r--r-- | libgo/runtime/signal_unix.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libgo/runtime/signal_unix.h b/libgo/runtime/signal_unix.h new file mode 100644 index 0000000..1c51740 --- /dev/null +++ b/libgo/runtime/signal_unix.h @@ -0,0 +1,22 @@ +// Copyright 2013 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. + +#include <signal.h> + +#define GO_SIG_DFL ((void*)SIG_DFL) +#define GO_SIG_IGN ((void*)SIG_IGN) + +#ifdef SA_SIGINFO +typedef siginfo_t Siginfo; +#else +typedef void *Siginfo; +#endif + +typedef void GoSighandler(int32, Siginfo*, void*, G*); +void runtime_setsig(int32, GoSighandler*, bool); +GoSighandler* runtime_getsig(int32); + +void runtime_sighandler(int32 sig, Siginfo *info, void *context, G *gp); +void runtime_raise(int32); + |