CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions
process.h File Reference
#include "threads/thread.h"
Include dependency graph for process.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

tid_t process_execute (const char *file_name)
 Starts a new thread running a user program loaded from FILENAME. More...
 
int process_wait (tid_t)
 
void process_exit (void)
 Free the current process's resources. More...
 
void process_activate (void)
 userprog/process.h More...
 

Function Documentation

◆ process_activate()

void process_activate ( void  )

userprog/process.h

userprog/process.h

This function is called on every context switch.

Definition at line 123 of file process.c.

References pagedir_activate(), thread_current(), and tss_update().

Referenced by load(), and thread_schedule_tail().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_execute()

tid_t process_execute ( const char *  file_name)

Starts a new thread running a user program loaded from FILENAME.

The new thread may be scheduled (and may even exit) before process_execute() returns. Returns the new process's thread id, or TID_ERROR if the thread cannot be created.

Definition at line 29 of file process.c.

References file_name, NULL, palloc_free_page(), palloc_get_page(), PGSIZE, PRI_DEFAULT, start_process(), strlcpy(), thread_create(), thread::tid, and TID_ERROR.

Referenced by run_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_exit()

void process_exit ( void  )

Free the current process's resources.

Definition at line 96 of file process.c.

References NULL, pagedir_activate(), pagedir_destroy(), and thread_current().

Referenced by thread_exit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_wait()

int process_wait ( tid_t  )