coredump.h 783 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_COREDUMP_H
  3. #define _LINUX_COREDUMP_H
  4. #include <linux/types.h>
  5. #include <linux/mm.h>
  6. #include <linux/fs.h>
  7. #include <asm/siginfo.h>
  8. /*
  9. * These are the only things you should do on a core-file: use only these
  10. * functions to write out all the necessary info.
  11. */
  12. struct coredump_params;
  13. extern int dump_skip(struct coredump_params *cprm, size_t nr);
  14. extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
  15. extern int dump_align(struct coredump_params *cprm, int align);
  16. extern void dump_truncate(struct coredump_params *cprm);
  17. #ifdef CONFIG_COREDUMP
  18. extern void do_coredump(const siginfo_t *siginfo);
  19. #else
  20. static inline void do_coredump(const siginfo_t *siginfo) {}
  21. #endif
  22. #endif /* _LINUX_COREDUMP_H */