PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Structures | Functions | Variables
tss.c File Reference
#include "userprog/tss.h"
#include <debug.h>
#include <stddef.h>
#include "userprog/gdt.h"
#include "threads/thread.h"
#include "threads/palloc.h"
#include "threads/vaddr.h"
Include dependency graph for tss.c:

Go to the source code of this file.

Data Structures

struct  tss
 The Task-State Segment (TSS). More...
 

Functions

void tss_init (void)
 Initializes the kernel TSS. More...
 
struct tsstss_get (void)
 Returns the kernel TSS. More...
 
void tss_update (void)
 Sets the ring 0 stack pointer in the TSS to point to the end of the thread stack. More...
 

Variables

static struct tsstss
 Kernel TSS. More...
 

Function Documentation

◆ tss_get()

struct tss * tss_get ( void  )

Returns the kernel TSS.

Definition at line 93 of file tss.c.

References ASSERT, NULL, and tss.

Referenced by gdt_init().

Here is the caller graph for this function:

◆ tss_init()

void tss_init ( void  )

Initializes the kernel TSS.

Definition at line 80 of file tss.c.

References tss::bitmap, PAL_ASSERT, PAL_ZERO, palloc_get_page(), SEL_KDSEG, tss::ss0, and tss_update().

Referenced by pintos_init().

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

◆ tss_update()

void tss_update ( void  )

Sets the ring 0 stack pointer in the TSS to point to the end of the thread stack.

userprog/tss.h

Definition at line 102 of file tss.c.

References ASSERT, tss::esp0, NULL, PGSIZE, and thread_current().

Referenced by process_activate(), and tss_init().

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

Variable Documentation

◆ tss

struct tss* tss
static

Kernel TSS.

Definition at line 76 of file tss.c.

Referenced by tss_get().