Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
deb97159
Commit
deb97159
authored
12 years ago
by
Christoph Hellwig
Browse files
Options
Downloads
Patches
Plain Diff
implement vectored I/O (readv/writev)
parent
5e90d3ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fs/vfs/main.c
+41
-0
41 additions, 0 deletions
fs/vfs/main.c
runtime.cc
+0
-10
0 additions, 10 deletions
runtime.cc
with
41 additions
and
10 deletions
fs/vfs/main.c
+
41
−
0
View file @
deb97159
...
@@ -223,6 +223,47 @@ out_errno:
...
@@ -223,6 +223,47 @@ out_errno:
return
-
1
;
return
-
1
;
}
}
ssize_t
readv
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
)
{
struct
task
*
t
=
main_task
;
file_t
fp
;
size_t
bytes
;
int
error
;
error
=
EBADF
;
if
((
fp
=
task_getfp
(
t
,
fd
))
==
NULL
)
goto
out_errno
;
error
=
sys_read
(
fp
,
(
struct
iovec
*
)
iov
,
iovcnt
,
&
bytes
);
if
(
error
)
goto
out_errno
;
return
bytes
;
out_errno:
errno
=
error
;
return
-
1
;
}
ssize_t
writev
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
)
{
struct
task
*
t
=
main_task
;
file_t
fp
;
size_t
bytes
;
int
error
;
error
=
EBADF
;
if
((
fp
=
task_getfp
(
t
,
fd
))
==
NULL
)
goto
out_errno
;
error
=
sys_write
(
fp
,
(
struct
iovec
*
)
iov
,
iovcnt
,
&
bytes
);
if
(
error
)
goto
out_errno
;
return
bytes
;
out_errno:
errno
=
error
;
return
-
1
;
}
#if 0
#if 0
static int
static int
fs_ioctl(struct task *t, struct ioctl_msg *msg)
fs_ioctl(struct task *t, struct ioctl_msg *msg)
...
...
This diff is collapsed.
Click to expand it.
runtime.cc
+
0
−
10
View file @
deb97159
...
@@ -207,16 +207,6 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
...
@@ -207,16 +207,6 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
UNIMPLEMENTED
(
"poll"
);
UNIMPLEMENTED
(
"poll"
);
}
}
ssize_t
readv
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
)
{
UNIMPLEMENTED
(
"readv"
);
}
ssize_t
writev
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
)
{
UNIMPLEMENTED
(
"writev"
);
}
ssize_t
preadv
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
)
ssize_t
preadv
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
)
{
{
UNIMPLEMENTED
(
"preadv"
);
UNIMPLEMENTED
(
"preadv"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment