Skip to content
Snippets Groups Projects
Commit bc730d56 authored by ja3-saxby's avatar ja3-saxby
Browse files

Add prototype and skeleton of populate_stack() for argument-parsing

parent 692f4b8e
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ lib/kernel_SRC += lib/kernel/console.c # printf(), putchar().
# User process code.
userprog_SRC = userprog/process.c # Process loading.
userprog_SRC += userprog/populate_stack.c # Populates stack with program arguments.
userprog_SRC += userprog/pagedir.c # Page directories.
userprog_SRC += userprog/exception.c # User exception handler.
userprog_SRC += userprog/syscall.c # System call handler.
......
#ifndef USERPROG_ARGUMENT_PARSING_H
#define USERPROG_ARGUMENT_PARSING_H
/*
* Given stack pointer `esp`, argument count `argc` and arguments array `argv`,
* Populates the stack pointed to by the stack pointer with the given arguments.
* TODO: clarify what, if anything, `esp` stands for and rename it to something
* clearer if possible.
*/
void populate_stack(void* esp, int argc, char** argv);
#endif /* userprog/argument_parsing.h */
#include "userprog/argument_parsing.h"
void populate_stack(void* esp, int argc, char** argv) {
#warning "Implement me"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment