signal_unix.h 580 B

1234567891011121314151617181920212223
  1. // Copyright 2013 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. #include <signal.h>
  5. #define GO_SIG_DFL ((void*)SIG_DFL)
  6. #define GO_SIG_IGN ((void*)SIG_IGN)
  7. #ifdef SA_SIGINFO
  8. typedef siginfo_t Siginfo;
  9. #else
  10. typedef void *Siginfo;
  11. #endif
  12. typedef void GoSighandler(int32, Siginfo*, void*, G*);
  13. void runtime_setsig(int32, GoSighandler*, bool);
  14. GoSighandler* runtime_getsig(int32);
  15. void runtime_sighandler(int32 sig, Siginfo *info, void *context, G *gp);
  16. void runtime_raise(int32);