git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: hook up the keyboard input into our vfs
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
vfs.c
diff --git
a/lunaix-os/kernel/fs/vfs.c
b/lunaix-os/kernel/fs/vfs.c
index 53d21d8b026baa7f07ce38bc34a12cda78c0ee90..1104d9b5533d9673f58722162c091a8da1d3c6ad 100644
(file)
--- a/
lunaix-os/kernel/fs/vfs.c
+++ b/
lunaix-os/kernel/fs/vfs.c
@@
-657,7
+657,9
@@
__DEFINE_LXSYSCALL3(int, read, int, fd, void*, buf, size_t, count)
goto done;
}
goto done;
}
+ cpu_enable_interrupt();
errno = file->ops.read(file, buf, count, file->f_pos);
errno = file->ops.read(file, buf, count, file->f_pos);
+ cpu_disable_interrupt();
if (errno > 0) {
file->f_pos += errno;
if (errno > 0) {
file->f_pos += errno;
@@
-683,7
+685,9
@@
__DEFINE_LXSYSCALL3(int, write, int, fd, void*, buf, size_t, count)
goto done;
}
goto done;
}
+ cpu_enable_interrupt();
errno = file->ops.write(file, buf, count, file->f_pos);
errno = file->ops.write(file, buf, count, file->f_pos);
+ cpu_disable_interrupt();
if (errno > 0) {
file->f_pos += errno;
if (errno > 0) {
file->f_pos += errno;