thread_terminate 内核服务

用途

终止调用内核线程。

语法

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

描述

thread_terminate 内核服务将终止调用内核线程,并清除其结构及其内核堆栈。 如果它是进程中的最后一个线程,那么进程将退出。

当线程从其入口点例程 (在对 kthread_start 内核服务的调用中定义) 返回时,将自动调用 thread_terminate 内核服务。

执行环境

thread_terminate 内核服务只能从 流程 环境中进行调用。

返回值

thread_terminate 内核服务从不返回。