THREAD_CLEANUP(3T) BSD THREAD_CLEANUP(3T)
NAME
thread_cleanup - initiate thread termination and detect termination
status
SYNOPSIS
include <apollo/thread.h>
kern_return_t thread_cleanup(thread_id, cleanup_status)
thread_t thread_id;
integer cleanup_status;
DESCRIPTION
thread_cleanup is equivalent to thread_terminate, with a different status
fed to the stack unwind. This will allow any cleanup handlers in the
target thread to recognize special reasons for the termination request
and possibly take special action.
The arguments are as follows:
thread_id The id of the thread to terminate.
cleanup_status
The status to use in the stack unwind.
Data Structures
The data structures are defined as follows:
thread_t
The basic thread id. This is a black box value that is not
significant outside the thread system. It is guaranteed that no two
active threads on a node will have the same thread id.
kern_return_t
An enumeration of the possible values a system call can return. It
indicates the success or failure of the call. It will either be
[KERN_SUCCESS] to indicate that the call succeeded, or some other
value to describe the reason for the failure.
SEE ALSO
thread_create(3T), thread_terminate(3T), thread_suspend(3T),
thread_resume(3T), thread_abort(3T), thread_self(3T), thread_info(3T),
thread_state(3T), thread_set_priority(3T), thread_handle_signals(3T),
thread_inhibit(3T), thread_startup(3T), threadp_init(3T),
threadp_set(3T), threadp_get(3T).
Section (3P) pthread calls (IEEE P1003.4a) calls
Domain System Software Release Notes, Software Release 10.4
NOTES
This call is one of the set of Domain/OS extensions to the Mach thread
interface.
This call is provided solely for compatibility with the Mach operating
system. New applications should use the Pthread interface instead.