Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
贾天宇
MIT6-S081-2020-labs
Commits
13dccb03
Commit
13dccb03
authored
4 years ago
by
Robert Morris
Committed by
Frans Kaashoek
4 years ago
Browse files
Options
Download
Patches
Plain Diff
consolewrite does not need cons.lock -- can lead to sleep() with lock held
parent
d4cecb26
traps
cow
fs
lock
mmap
pgtbl
syscall
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/console.c
+0
-2
kernel/console.c
with
0 additions
and
2 deletions
+0
-2
kernel/console.c
+
0
−
2
View file @
13dccb03
...
...
@@ -60,14 +60,12 @@ consolewrite(int user_src, uint64 src, int n)
{
int
i
;
acquire
(
&
cons
.
lock
);
for
(
i
=
0
;
i
<
n
;
i
++
){
char
c
;
if
(
either_copyin
(
&
c
,
user_src
,
src
+
i
,
1
)
==
-
1
)
break
;
uartputc
(
c
);
}
release
(
&
cons
.
lock
);
return
i
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets