package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev

# Functions

MsgToStackAddr returns a start address of a stack.
StackAddrToMsg returns an address of a sysmsg structure.
StackAddrToSyshandlerStack returns an address of a syshandler stack.

# Constants

AllocatedSizeofThreadContextStruct defines how much memory to allocate for one instance of ThreadContext.
ContextStateFault means that there is a fault event that needs to be handled.
ContextStateInvalid is an invalid state that the sentry should never see.
ContextStateNone means that is either running in the user task or is ready to run in the user task.
ContextStateSyscall means that a syscall event is triggered from the sighandler.
ContextStateSyscallCanBePatched means that the syscall can be replaced with a function call.
ContextStateSyscallTrap means that a syscall event is triggered from a function call (syshandler).
GuardSize is the size of an unmapped region which is placed right before the signal stack.
MaxFPStateLen is the largest possible FPState that we will save.
MsgOffsetFromStack is the offset of the Msg structure on the thread stack.
PerThreadMemSize is the size of a per-thread memory region.
LINT.IfChange Per-thread stack layout: *------------* | guard page | |------------| | | | sysstack | | | *------------* | guard page | |------------| | | | ^ | | / \ | | | | | altstack | |------------| | sysmsg | *------------*.
LINT.IfChange Per-thread stack layout: *------------* | guard page | |------------| | | | sysstack | | | *------------* | guard page | |------------| | | | ^ | | / \ | | | | | altstack | |------------| | sysmsg | *------------*.
LINT.IfChange Per-thread stack layout: *------------* | guard page | |------------| | | | sysstack | | | *------------* | guard page | |------------| | | | ^ | | / \ | | | | | altstack | |------------| | sysmsg | *------------*.
PerThreadStackSharedSize is the size of a per-thread stack region.
SpinningQueueMemSize is the size of a spinning queue memory region.
ThreadStateAsleep means that this thread fell asleep because there was not enough contexts to process in the context queue.
ThreadStateDone means that last event has been handled and the stub thread can be resumed.
ThreadStateInitializing is only set once at sysmsg thread creation time.
ThreadStateNone means that the thread is executing the user workload.
ThreadStatePrep means that syshandler started filling the sysmsg struct.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SighandlerBlob contains the compiled code of the sysmsg signal handler.

# Structs

ArchState defines variables specific to the architecture being used.
Msg contains the current state of the sysmsg thread.
ThreadContext contains the current context of the sysmsg thread.

# Type aliases

ContextState defines the reason the context has exited back to the sentry, or ContextStateNone if running/ready-to-run.
ThreadState is used to store a state of the sysmsg thread.