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
5573c8f2
Commit
5573c8f2
authored
17 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
delete proc_ on proc_exit, proc_wait, proc_kill
parent
eb52c7de
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defs.h
+3
-3
3 additions, 3 deletions
defs.h
proc.c
+3
-3
3 additions, 3 deletions
proc.c
sysproc.c
+3
-3
3 additions, 3 deletions
sysproc.c
trap.c
+3
-3
3 additions, 3 deletions
trap.c
with
12 additions
and
12 deletions
defs.h
+
3
−
3
View file @
5573c8f2
...
...
@@ -98,10 +98,10 @@ int pipewrite(struct pipe*, char*, int);
struct
proc
*
copyproc
(
struct
proc
*
);
int
growproc
(
int
);
void
pinit
(
void
);
void
proc_exit
(
void
);
int
proc_kill
(
int
);
int
proc_wait
(
void
);
void
procdump
(
void
);
void
exit
(
void
);
int
kill
(
int
);
int
wait
(
void
);
void
scheduler
(
void
)
__attribute__
((
noreturn
));
void
setupsegs
(
struct
proc
*
);
void
sleep
(
void
*
,
struct
spinlock
*
);
...
...
This diff is collapsed.
Click to expand it.
proc.c
+
3
−
3
View file @
5573c8f2
...
...
@@ -318,7 +318,7 @@ wakeup(void *chan)
// Process won't actually exit until it returns
// to user space (see trap in trap.c).
int
proc_
kill
(
int
pid
)
kill
(
int
pid
)
{
struct
proc
*
p
;
...
...
@@ -341,7 +341,7 @@ proc_kill(int pid)
// Exited processes remain in the zombie state
// until their parent calls wait() to find out they exited.
void
proc_
exit
(
void
)
exit
(
void
)
{
struct
proc
*
p
;
int
fd
;
...
...
@@ -384,7 +384,7 @@ proc_exit(void)
// Wait for a child process to exit and return its pid.
// Return -1 if this process has no children.
int
proc_
wait
(
void
)
wait
(
void
)
{
struct
proc
*
p
;
int
i
,
havekids
,
pid
;
...
...
This diff is collapsed.
Click to expand it.
sysproc.c
+
3
−
3
View file @
5573c8f2
...
...
@@ -18,14 +18,14 @@ sys_fork(void)
int
sys_exit
(
void
)
{
proc_
exit
();
exit
();
return
0
;
// not reached
}
int
sys_wait
(
void
)
{
return
proc_
wait
();
return
wait
();
}
int
...
...
@@ -35,7 +35,7 @@ sys_kill(void)
if
(
argint
(
0
,
&
pid
)
<
0
)
return
-
1
;
return
proc_
kill
(
pid
);
return
kill
(
pid
);
}
int
...
...
This diff is collapsed.
Click to expand it.
trap.c
+
3
−
3
View file @
5573c8f2
...
...
@@ -36,11 +36,11 @@ trap(struct trapframe *tf)
{
if
(
tf
->
trapno
==
T_SYSCALL
){
if
(
cp
->
killed
)
proc_
exit
();
exit
();
cp
->
tf
=
tf
;
syscall
();
if
(
cp
->
killed
)
proc_
exit
();
exit
();
return
;
}
...
...
@@ -89,7 +89,7 @@ trap(struct trapframe *tf)
// (If it is still executing in the kernel, let it keep running
// until it gets to the regular system call return.)
if
(
cp
&&
cp
->
killed
&&
(
tf
->
cs
&
3
)
==
DPL_USER
)
proc_
exit
();
exit
();
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
...
...
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