aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/erl_efile.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-12-02 15:08:47 +0100
committerLukas Larsson <[email protected]>2011-12-02 15:08:47 +0100
commitf30ac8e5a84c550734b79a6d66639c4d3489c6fd (patch)
tree331a81551b21d75c41b5edc25b9077bfe2a8cf70 /erts/emulator/drivers/common/erl_efile.h
parent7bd9c1f9a68a024958040fe5b77dacc73bb6c5ab (diff)
parent62fffa75e2003b3f19eb7614307942028a400fd1 (diff)
downloadotp-f30ac8e5a84c550734b79a6d66639c4d3489c6fd.tar.gz
otp-f30ac8e5a84c550734b79a6d66639c4d3489c6fd.tar.bz2
otp-f30ac8e5a84c550734b79a6d66639c4d3489c6fd.zip
Merge branch 'ta/sendfile/OTP-9240'
* ta/sendfile/OTP-9240: (31 commits) Add sendfile server printouts Skip recv/send during tests for fallback platforms Remove header/trailer support Remove windows implementation Expand sendfile documentation Only allow tcp sockets as target for sendfile Move sendfile api to file module Preliminary work on header/trailer Use free_sendfile explicitly for non-async Remove debug printouts Add tests for send/recv/sendfile interactions Remove tests for file_server sendfile sendfile caller now has to be the controlling_process Remove support for file_server, sendfile has to be raw Set chunk size to 3 GB Change type of fd to be ErlDrvEvent Add ifdef's for HAVE_SENDFILE Fix freebsd support for sendfile Change nbytes to 64 bit Implement ignorefd for TCP ...
Diffstat (limited to 'erts/emulator/drivers/common/erl_efile.h')
-rw-r--r--erts/emulator/drivers/common/erl_efile.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/erl_efile.h b/erts/emulator/drivers/common/erl_efile.h
index 3097ded3f1..349ab0e17b 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.
*/
@@ -162,3 +175,7 @@ int efile_symlink(Efile_error* errInfo, char* old, char* new);
int efile_may_openfile(Efile_error* errInfo, char *name);
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, struct t_sendfile_hdtl *hdtl);
+#endif /* HAVE_SENDFILE */