MentOS  0.8.0
The Mentoring Operating System
Classes | Typedefs | Functions
Task State Segment (TSS)

Is a special structure on x86-based computers which holds information about a task. It is used by the operating system kernel for task management. More...

Classes

struct  tss_entry
 Task state segment entry. More...
 

Typedefs

typedef struct tss_entry tss_entry_t
 Task state segment entry.
 

Functions

void tss_flush (void)
 Flushes the Task State Segment.
 
void tss_init (uint8_t idx, uint32_t ss0)
 We don't need tss to assist task switching, but it's required to have one tss for switching back to kernel mode(system call for example). More...
 
void tss_set_stack (uint32_t kss, uint32_t kesp)
 This function is used to set the esp the kernel should be using. More...
 

Detailed Description

Is a special structure on x86-based computers which holds information about a task. It is used by the operating system kernel for task management.

Function Documentation

◆ tss_init()

void tss_init ( uint8_t  idx,
uint32_t  ss0 
)

We don't need tss to assist task switching, but it's required to have one tss for switching back to kernel mode(system call for example).

Parameters
idxIndex.
ss0Kernel data segment.

◆ tss_set_stack()

void tss_set_stack ( uint32_t  kss,
uint32_t  kesp 
)

This function is used to set the esp the kernel should be using.

Parameters
kssKernel data segment.
kespKernel stack address.