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
d10d324e
Commit
d10d324e
authored
13 years ago
by
Frans Kaashoek
Browse files
Options
Downloads
Patches
Plain Diff
Remove sys_init syscall
Invoke initlog from forkret on first user process
parent
39f8cc56
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
initcode.S
+0
-2
0 additions, 2 deletions
initcode.S
main.c
+1
-1
1 addition, 1 deletion
main.c
proc.c
+6
-0
6 additions, 0 deletions
proc.c
syscall.c
+0
-9
0 additions, 9 deletions
syscall.c
syscall.h
+0
-1
0 additions, 1 deletion
syscall.h
with
7 additions
and
13 deletions
initcode.S
+
0
−
2
View file @
d10d324e
...
...
@@ -7,8 +7,6 @@
#
exec
(
init
,
argv
)
.
globl
start
start
:
movl
$SYS_init
,
%
eax
int
$T_SYSCALL
pushl
$argv
pushl
$init
pushl
$
0
//
where
caller
pc
would
be
...
...
This diff is collapsed.
Click to expand it.
main.c
+
1
−
1
View file @
d10d324e
...
...
@@ -60,7 +60,7 @@ mpmain(void)
scheduler
();
// start running processes
}
pde_t
enterpgdir
[];
pde_t
enterpgdir
[];
// For entry.S
// Start the non-boot (AP) processors.
static
void
...
...
This diff is collapsed.
Click to expand it.
proc.c
+
6
−
0
View file @
d10d324e
...
...
@@ -322,8 +322,14 @@ yield(void)
void
forkret
(
void
)
{
static
int
first
=
1
;
// Still holding ptable.lock from scheduler.
release
(
&
ptable
.
lock
);
if
(
first
)
{
first
=
0
;
initlog
();
}
// Return to "caller", actually trapret (see allocproc).
}
...
...
This diff is collapsed.
Click to expand it.
syscall.c
+
0
−
9
View file @
d10d324e
...
...
@@ -99,15 +99,7 @@ extern int sys_wait(void);
extern
int
sys_write
(
void
);
extern
int
sys_uptime
(
void
);
int
sys_init
(
void
)
{
initlog
();
return
0
;
}
static
int
(
*
syscalls
[])(
void
)
=
{
[
SYS_init
]
sys_init
,
[
SYS_fork
]
sys_fork
,
[
SYS_exit
]
sys_exit
,
[
SYS_wait
]
sys_wait
,
...
...
@@ -122,7 +114,6 @@ static int (*syscalls[])(void) = {
[
SYS_sbrk
]
sys_sbrk
,
[
SYS_sleep
]
sys_sleep
,
[
SYS_uptime
]
sys_uptime
,
// File system calls that are run in a transaction:
[
SYS_open
]
sys_open
,
[
SYS_write
]
sys_write
,
[
SYS_mknod
]
sys_mknod
,
...
...
This diff is collapsed.
Click to expand it.
syscall.h
+
0
−
1
View file @
d10d324e
// System call numbers
#define SYS_init 0
#define SYS_fork 1
#define SYS_exit 2
#define SYS_wait 3
...
...
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