Skip to content

Commit

Permalink
lint(all): apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Oct 21, 2023
1 parent e1e5b16 commit 07724be
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
5 changes: 3 additions & 2 deletions include/co_context/co/when_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ struct all_meta_base {
// happen!
uint32_t wait_num;

explicit
all_meta_base(std::coroutine_handle<> await_handle, uint32_t n) noexcept
explicit all_meta_base(
std::coroutine_handle<> await_handle, uint32_t n
) noexcept
: await_handle(await_handle)
, wait_num(n) {}

Expand Down
55 changes: 33 additions & 22 deletions include/co_context/detail/lazy_io_awaiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,18 @@ struct lazy_recvmsg : lazy_awaiter {

#if LIBURINGCXX_IS_KERNEL_REACH(5, 20)
struct lazy_recvmsg_multishot : lazy_awaiter {
inline
lazy_recvmsg_multishot(int fd, msghdr *msg, unsigned flags) noexcept {
inline lazy_recvmsg_multishot(
int fd, msghdr *msg, unsigned flags
) noexcept {
sqe->prep_recvmsg_multishot(fd, msg, flags);
}
};
#endif

struct lazy_sendmsg : lazy_awaiter {
inline
lazy_sendmsg(int fd, const msghdr *msg, unsigned int flags) noexcept {
inline lazy_sendmsg(
int fd, const msghdr *msg, unsigned int flags
) noexcept {
sqe->prep_sendmsg(fd, msg, flags);
}
};
Expand Down Expand Up @@ -508,8 +510,9 @@ struct lazy_link_timeout
};

struct lazy_connect : lazy_awaiter {
inline
lazy_connect(int sockfd, const sockaddr *addr, socklen_t addrlen) noexcept {
inline lazy_connect(
int sockfd, const sockaddr *addr, socklen_t addrlen
) noexcept {
sqe->prep_connect(sockfd, addr, addrlen);
}
};
Expand All @@ -521,15 +524,17 @@ struct lazy_files_update : lazy_awaiter {
};

struct lazy_fallocate : lazy_awaiter {
inline
lazy_fallocate(int fd, int mode, uint64_t offset, uint64_t len) noexcept {
inline lazy_fallocate(
int fd, int mode, uint64_t offset, uint64_t len
) noexcept {
sqe->prep_fallocate(fd, mode, offset, len);
}
};

struct lazy_openat : lazy_awaiter {
inline
lazy_openat(int dfd, const char *path, int flags, mode_t mode) noexcept {
inline lazy_openat(
int dfd, const char *path, int flags, mode_t mode
) noexcept {
sqe->prep_openat(dfd, path, flags, mode);
}
};
Expand Down Expand Up @@ -560,8 +565,9 @@ struct lazy_read : lazy_awaiter {
};

struct lazy_write : lazy_awaiter {
inline
lazy_write(int fd, std::span<const char> buf, uint64_t offset) noexcept {
inline lazy_write(
int fd, std::span<const char> buf, uint64_t offset
) noexcept {
sqe->prep_write(fd, buf, offset);
}
};
Expand All @@ -579,8 +585,9 @@ struct lazy_statx : lazy_awaiter {
};

struct lazy_fadvise : lazy_awaiter {
inline
lazy_fadvise(int fd, uint64_t offset, off_t len, int advice) noexcept {
inline lazy_fadvise(
int fd, uint64_t offset, off_t len, int advice
) noexcept {
sqe->prep_fadvise(fd, offset, len, advice);
}
};
Expand All @@ -592,8 +599,9 @@ struct lazy_madvise : lazy_awaiter {
};

struct lazy_send : lazy_awaiter {
inline
lazy_send(int sockfd, std::span<const char> buf, int flags) noexcept {
inline lazy_send(
int sockfd, std::span<const char> buf, int flags
) noexcept {
sqe->prep_send(sockfd, buf, flags);
}
};
Expand Down Expand Up @@ -634,8 +642,9 @@ struct lazy_recv : lazy_awaiter {

#if LIBURINGCXX_IS_KERNEL_REACH(5, 20)
struct lazy_recv_multishot : lazy_awaiter {
inline
lazy_recv_multishot(int sockfd, std::span<char> buf, int flags) noexcept {
inline lazy_recv_multishot(
int sockfd, std::span<char> buf, int flags
) noexcept {
sqe->prep_recv_multishot(sockfd, buf, flags);
}
};
Expand Down Expand Up @@ -763,8 +772,9 @@ struct lazy_linkat : lazy_awaiter {
};

struct lazy_link : lazy_awaiter {
inline
lazy_link(const char *oldpath, const char *newpath, int flags) noexcept {
inline lazy_link(
const char *oldpath, const char *newpath, int flags
) noexcept {
sqe->prep_link(oldpath, newpath, flags);
}
};
Expand Down Expand Up @@ -812,8 +822,9 @@ struct lazy_setxattr : lazy_awaiter {
};

struct lazy_fgetxattr : lazy_awaiter {
inline
lazy_fgetxattr(int fd, const char *name, char *value, size_t len) noexcept {
inline lazy_fgetxattr(
int fd, const char *name, char *value, size_t len
) noexcept {
sqe->prep_fgetxattr(fd, name, value, len);
}
};
Expand Down

0 comments on commit 07724be

Please sign in to comment.