Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99c55ce5
authored
Dec 18, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Allocate space for a kstack
parent
ca531e3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
src/PCB.h
src/elf.c
src/PCB.h
View file @
99c55ce5
...
...
@@ -61,7 +61,7 @@ typedef struct
page_directory_entry
*
mem
;
volatile
int
pid
;
struct
process
*
parent
;
char
*
kstack
;
//apparently we need this. idk why
char
*
kstack
;
//apparently we need this. idk why
trapframe
*
tf
;
context
*
ctxt
;
char
name
[
32
];
...
...
src/elf.c
View file @
99c55ce5
...
...
@@ -69,6 +69,9 @@ void load_elf(elf_header* elf_start)
pcb
->
ctxt
=
(
context
*
)((
size_t
)
pcb
+
sizeof
(
process
));
pcb
->
tf
=
(
trapframe
*
)((
size_t
)
pcb
+
sizeof
(
process
)
+
sizeof
(
context
));
// And of course, a kstack
pcb
->
kstack
=
(
char
*
)
kmalloc
(
0x1000
);
pcb
->
mem
=
pgdir
;
pcb
->
pid
=
-
1
;
pcb
->
parent
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment