-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscall(fs): implement readv and writev
- Loading branch information
Showing
8 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
|
||
#include <stddef.h> | ||
|
||
struct iovec { | ||
void* iov_base; // Starting address | ||
size_t iov_len; // Size of the memory pointed to by iov_base. | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,8 +65,6 @@ | |
F(setfsgid) \ | ||
F(flock) \ | ||
F(msync) \ | ||
F(readv) \ | ||
F(writev) \ | ||
F(getsid) \ | ||
F(fdatasync) \ | ||
F(mlock) \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "uio.h" | ||
#include <private.h> | ||
|
||
ssize_t readv(int fd, const struct iovec* iov, int iovcnt) { | ||
RETURN_WITH_ERRNO(ssize_t, SYSCALL3(readv, fd, iov, iovcnt)); | ||
} | ||
|
||
ssize_t writev(int fd, const struct iovec* iov, int iovcnt) { | ||
RETURN_WITH_ERRNO(ssize_t, SYSCALL3(writev, fd, iov, iovcnt)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <kernel/api/sys/uio.h> | ||
#include <sys/types.h> | ||
|
||
ssize_t readv(int fd, const struct iovec* iov, int iovcnt); | ||
ssize_t writev(int fd, const struct iovec* iov, int iovcnt); |