PANDOS_TYPES

This header file contains utility types definitions.

Typedefs

typedef signed int cpu_t
typedef unsigned int memaddr

Represents a memory address.

typedef struct pteEntry_t pteEntry_t
typedef struct context_t context_t
typedef struct support_t support_t
typedef struct pcb_t pcb_t
typedef struct pcb_t *pcb_PTR
typedef unsigned int size_t

Represents a size.

int bool

Represents a boolean value.

typedef int semaphore

Represents a semaphore.

typedef struct swap_t swap_t
struct pteEntry_t

Public Members

unsigned int pte_entryHI
unsigned int pte_entryLO
struct context_t

Public Members

unsigned int c_stackPtr
unsigned int c_status
unsigned int c_pc
struct support_t

Public Members

int sup_asid

Process ID.

state_t sup_exceptState[2]

Old state exceptions.

context_t sup_exceptContext[2]

New contexts for passing up.

pteEntry_t sup_privatePgTbl[USERPGTBLSIZE]

User page table.

int sup_stackTLB[500]
int sup_stackGen[500]
struct pcb_t
#include <pandos_types.h>

Process Control Block.

Remark

When inside a queue, by convention p_next points to the PCB that will exit the queue before it, while p_prev points to the PCB that will exit the queue after it.

Public Members

struct pcb_t *p_next

Pointer to next entry.

struct pcb_t *p_prev

Pointer to previous entry.

struct pcb_t *p_prnt

Pointer to parent.

struct pcb_t *p_child

Pointer to 1st child.

struct pcb_t *p_next_sib

Pointer to next sibling.

struct pcb_t *p_prev_sib

Pointer to previous sibling.

state_t p_s

Processor state.

cpu_t p_time

Cpu time used by process.

int *p_semAdd

Pointer to semaphore on which process is blocked.

support_t *p_supportStruct

Support structure.

struct swap_t

Public Members

int sw_asid

ASID number.

int sw_pageNo

Page’s virtual page number.

pteEntry_t *sw_pte

Page’s PTE entry.