process.h

struct TrapFrame

The TrapFrame is a struct that holds the state of all the cpu registers before the trap.

Since

v0.1

u64 regs[32]

integer registers

u64 fregs[32]

floating point registers

u64 satp

Supervisor Address Translation and Protection register, a pointer to the virtual memory table to be used. Some of the bits tell the type of address translation being used. (TODO detail these bits.)

int process_shrink_allocation()

Returns the kallocation that is no longer being tracked by the process. If “new_page_count” is 0 then this is the whole kallocation at vaddr.

If the shrink fails or encounters an error state the returned “kallocation” points to NULL.

TODO explain the context in detail.

Parameters
  • process – a Process instance

  • vaddr – TODO

  • new_page_count – TODO

Returns

a Kallocation instance or a NULL pointer

Since

v0.1