From a5b3d81936ab85edb8713f29baf85307ae0b25b8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 25 Nov 2011 20:29:59 +0100 Subject: Preliminary work on header/trailer Have to figure out how to represent progress in header writing when using non-blocking, not sure how to do this. --- erts/emulator/drivers/common/erl_efile.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'erts/emulator/drivers/common/erl_efile.h') diff --git a/erts/emulator/drivers/common/erl_efile.h b/erts/emulator/drivers/common/erl_efile.h index fd6dc94755..b73fb35120 100644 --- a/erts/emulator/drivers/common/erl_efile.h +++ b/erts/emulator/drivers/common/erl_efile.h @@ -118,6 +118,19 @@ typedef struct _Efile_info { */ } Efile_info; + +#ifdef HAVE_SENDFILE +/* + * Described the structure of header/trailers for sendfile + */ +struct t_sendfile_hdtl { + SysIOVec *headers; + int hdr_cnt; + SysIOVec *trailers; + int trl_cnt; +}; +#endif /* HAVE_SENDFILE */ + /* * Functions. */ @@ -164,5 +177,5 @@ int efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset, Sint64 length, int advise); #ifdef HAVE_SENDFILE int efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, - off_t *offset, Uint64 *nbytes); + off_t *offset, Uint64 *nbytes, struct t_sendfile_hdtl **hdtl); #endif /* HAVE_SENDFILE */ -- cgit v1.2.3