Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Krishna Vinnakota
CSEP551
Commits
82201353
Commit
82201353
authored
16 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
xv6: use stosb for memset
parent
c396d065
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
string.c
+2
-6
2 additions, 6 deletions
string.c
ulib.c
+2
-5
2 additions, 5 deletions
ulib.c
with
4 additions
and
11 deletions
string.c
+
2
−
6
View file @
82201353
#include
"types.h"
#include
"x86.h"
void
*
memset
(
void
*
dst
,
int
c
,
uint
n
)
{
char
*
d
;
d
=
(
char
*
)
dst
;
while
(
n
--
>
0
)
*
d
++
=
c
;
stosb
(
dst
,
c
,
n
);
return
dst
;
}
...
...
This diff is collapsed.
Click to expand it.
ulib.c
+
2
−
5
View file @
82201353
...
...
@@ -2,6 +2,7 @@
#include
"stat.h"
#include
"fcntl.h"
#include
"user.h"
#include
"x86.h"
char
*
strcpy
(
char
*
s
,
char
*
t
)
...
...
@@ -35,11 +36,7 @@ strlen(char *s)
void
*
memset
(
void
*
dst
,
int
c
,
uint
n
)
{
char
*
d
;
d
=
dst
;
while
(
n
--
>
0
)
*
d
++
=
c
;
stosb
(
dst
,
c
,
n
);
return
dst
;
}
...
...
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