Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
349ee132
Commit
349ee132
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
add zombie program
parent
a7d18bb6
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
Makefile
+11
-5
11 additions, 5 deletions
Makefile
zombie.c
+12
-0
12 additions, 0 deletions
zombie.c
with
23 additions
and
5 deletions
Makefile
+
11
−
5
View file @
349ee132
...
...
@@ -33,7 +33,8 @@ CC = $(TOOLPREFIX)gcc
LD
=
$(
TOOLPREFIX
)
ld
OBJCOPY
=
$(
TOOLPREFIX
)
objcopy
OBJDUMP
=
$(
TOOLPREFIX
)
objdump
CFLAGS
=
-fno-builtin
-O2
-Wall
-MD
# On newer gcc you may need to add -fno-stack-protector to $(CFLAGS)
CFLAGS
=
-fno-builtin
-O2
-Wall
-MD
-fno-stack-protector
AS
=
$(
TOOLPREFIX
)
gas
xv6.img
:
bootblock kernel fs.img
...
...
@@ -99,19 +100,24 @@ _rm : rm.o $(ULIB)
$(
LD
)
-N
-e
main
-Ttext
0
-o
_rm rm.o
$(
ULIB
)
$(
OBJDUMP
)
-S
_rm
>
rm.asm
_zombie
:
zombie.o $(ULIB)
$(
LD
)
-N
-e
main
-Ttext
0
-o
_zombie zombie.o
$(
ULIB
)
$(
OBJDUMP
)
-S
_zombie
>
zombie.asm
mkfs
:
mkfs.c fs.h
cc
-o
mkfs mkfs.c
fs.img
:
mkfs usertests _echo _cat README _init _sh _ls _mkdir _rm
./mkfs fs.img usertests _echo _cat README _init _sh _ls _mkdir _rm
UPROGS
=
usertests _echo _cat _init _sh _ls _mkdir _rm _zombie
fs.img
:
mkfs README $(UPROGS)
./mkfs fs.img README
$(
UPROGS
)
-include
*.d
clean
:
rm
-f
*
.ps
*
.tex
*
.dvi
*
.idx
*
.aux
*
.log
*
.ind
*
.ilg
\
*
.o
*
.d
*
.asm vectors.S parport.out
\
bootblock kernel xv6.img
usertest
s
\
fs.img _cat _echo _init _sh _ls _rm _mkdir mkfs
bootblock kernel xv6.img
fs.img mkf
s
\
$(
UPROGS
)
# make a printout
PRINT
=
\
...
...
This diff is collapsed.
Click to expand it.
zombie.c
0 → 100644
+
12
−
0
View file @
349ee132
// Create a zombie process.
#include
"types.h"
#include
"stat.h"
#include
"user.h"
int
main
(
void
)
{
fork
();
exit
();
}
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