thread_terminate Kernel Service

Purpose

Terminates the calling kernel thread.

Syntax

#include <sys/thread.h>
void thread_terminate ()

Description

The thread_terminate kernel service terminates the calling kernel thread and cleans up its structure and its kernel stack. If it is the last thread in the process, the process will exit.

The thread_terminate kernel service is automatically called when a thread returns from its entry point routine (defined in the call to the kthread_start kernel service).

Execution Environment

The thread_terminate kernel service can be called from the process environment only.

Return Values

The thread_terminate kernel service never returns.