kstack_contains(9)

kstack_contains9

Determine if an address range lies within the kernel stack for a thread

Usage

#include <machine/stack.h>

bool

kstack_contains(struct thread *td, vm_offset_t va, size_t len);

Overview

This function can be used to determine whether a given address range falls within the kernel stack for the thread pointed to by td.

Return values

The function kstack_contains() returns true if the range of addresses[ va..(va+ len-1)] (both addresses inclusive) lies within the kernel stack for the thread pointed to by argument td, or returns false otherwise.

Errors

This function does not return an error.

Releases

Unchanged in 9 releases since FreeBSD 14.0-RELEASE.

  1. 14.0–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.