kthread_kill Kernel Service

Purpose

Posts a signal to a specified kernel-only thread.

Syntax

#include <sys/thread.h>

void kthread_kill ( tid,  sig)
tid_t tid;
int sig;

Parameters

Item Description
tid Specifies the target kernel-only thread. If its value is -1, the signal is posted to the calling thread.
sig Specifies the signal number to post.

Description

The kthread_kill kernel service posts the signal sig to the kernel thread specified by the tid parameter. When the service is called from the process environment, the target thread must be in the same process as the calling thread. When the service is called from the interrupt environment, the signal is posted to the target thread, without a permission check.

Execution Environment

The kthread_kill kernel service can be called from either the process environment or the interrupt environment.

Return Values

The kthread_kill kernel service has no return values.