sigframe

package
v0.0.0-...-f6cd886 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sigframe implements a mechanism to create a signal frame on the stack and execute a user-defined callback function within that context. The callback function can use the `sigreturn` system call to resuming the current thread with the state from the signal frame. This functionality can be helpful in scenarios where you need to simulate a signal handler-like behavior without triggering a signal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallWithSignalFrame

func CallWithSignalFrame(stack uintptr, handlerAddr uintptr, sigframe *arch.UContext64, fpstate uintptr, sigmask *linux.SignalSet) error

CallWithSignalFrame sets up a signal frame on the stack and executes a user-defined callback function within that context.

Caller-save registers can be used for passing arguments to the handler. These registers must be pre-set within the signal frame.

func Sigreturn

func Sigreturn(sigframeAddr *arch.UContext64)

Sigreturn restores the thread state from the signal frame.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL