1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2020 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // iofwd.hfa -- |
---|
8 | // |
---|
9 | // Author : Thierry Delisle |
---|
10 | // Created On : Thu Apr 23 17:31:00 2020 |
---|
11 | // Last Modified By : |
---|
12 | // Last Modified On : |
---|
13 | // Update Count : |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <unistd.h> |
---|
19 | extern "C" { |
---|
20 | #include <sys/types.h> |
---|
21 | } |
---|
22 | #include "bits/defs.hfa" |
---|
23 | |
---|
24 | struct iovec; |
---|
25 | struct msghdr; |
---|
26 | struct sockaddr; |
---|
27 | struct statx; |
---|
28 | |
---|
29 | extern ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags); |
---|
30 | extern ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags); |
---|
31 | extern int cfa_fsync(int fd); |
---|
32 | extern int cfa_sync_file_range(int fd, int64_t offset, int64_t nbytes, unsigned int flags); |
---|
33 | extern ssize_t cfa_sendmsg(int sockfd, const struct msghdr *msg, int flags); |
---|
34 | extern ssize_t cfa_recvmsg(int sockfd, struct msghdr *msg, int flags); |
---|
35 | extern ssize_t cfa_send(int sockfd, const void *buf, size_t len, int flags); |
---|
36 | extern ssize_t cfa_recv(int sockfd, void *buf, size_t len, int flags); |
---|
37 | extern int cfa_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags); |
---|
38 | extern int cfa_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); |
---|
39 | extern int cfa_fallocate(int fd, int mode, uint64_t offset, uint64_t len); |
---|
40 | extern int cfa_fadvise(int fd, uint64_t offset, uint64_t len, int advice); |
---|
41 | extern int cfa_madvise(void *addr, size_t length, int advice); |
---|
42 | extern int cfa_openat(int dirfd, const char *pathname, int flags, mode_t mode); |
---|
43 | extern int cfa_close(int fd); |
---|
44 | extern int cfa_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf); |
---|
45 | extern ssize_t cfa_read(int fd, void *buf, size_t count); |
---|
46 | extern ssize_t cfa_write(int fd, void *buf, size_t count); |
---|
47 | extern ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags); |
---|
48 | extern ssize_t cfa_tee(int fd_in, int fd_out, size_t len, unsigned int flags); |
---|
49 | |
---|
50 | //----------------------------------------------------------------------------- |
---|
51 | // Check if a function is blocks a only the user thread |
---|
52 | bool has_user_level_blocking( fptr_t func ); |
---|