blob: d016a121a8c46492bd6feea5b093dcea9bf27933 [file] [log] [blame]
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08001#ifndef _LINUX_COREDUMP_H
2#define _LINUX_COREDUMP_H
3
4#include <linux/types.h>
5#include <linux/mm.h>
6#include <linux/fs.h>
Richard Weinberger1d46e232012-10-19 13:56:47 -07007#include <asm/siginfo.h>
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08008
9/*
10 * These are the only things you should do on a core-file: use only these
11 * functions to write out all the necessary info.
12 */
Al Viroecc8c772013-10-05 15:32:35 -040013struct coredump_params;
Al Viro9b56d542013-10-08 09:26:08 -040014extern int dump_skip(struct coredump_params *cprm, size_t nr);
Al Viroecc8c772013-10-05 15:32:35 -040015extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
Al Viro22a8cb82013-10-08 11:05:01 -040016extern int dump_align(struct coredump_params *cprm, int align);
Alex Kelly179899f2012-10-04 17:15:24 -070017#ifdef CONFIG_COREDUMP
Al Viroec579412013-10-13 17:57:29 -040018extern void do_coredump(const siginfo_t *siginfo);
Alex Kelly179899f2012-10-04 17:15:24 -070019#else
Al Viroec579412013-10-13 17:57:29 -040020static inline void do_coredump(const siginfo_t *siginfo) {}
Alex Kelly179899f2012-10-04 17:15:24 -070021#endif
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -080022
23#endif /* _LINUX_COREDUMP_H */