signal.h 575 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
  2. /*
  3. * signal function definitions for NOLIBC
  4. * Copyright (C) 2017-2022 Willy Tarreau <[email protected]>
  5. */
  6. #ifndef _NOLIBC_SIGNAL_H
  7. #define _NOLIBC_SIGNAL_H
  8. #include "std.h"
  9. #include "arch.h"
  10. #include "types.h"
  11. #include "sys.h"
  12. /* This one is not marked static as it's needed by libgcc for divide by zero */
  13. __attribute__((weak,unused,section(".text.nolibc_raise")))
  14. int raise(int signal)
  15. {
  16. return sys_kill(sys_getpid(), signal);
  17. }
  18. /* make sure to include all global symbols */
  19. #include "nolibc.h"
  20. #endif /* _NOLIBC_SIGNAL_H */