NAME

fttl_deactivate_persist_thread - Deactivate an instance of a persistent timeline thread.

SYNOPSIS

kern_return_t fttl_deactivate_persist_thread(thread_id, name, instance)
thread_t thread_id;
char * name;
int instance;

DESCRIPTION

The fttl_deactivate_persist_thread system call removes a single instance or all instances of a persistent timeline thread from the timeline. The thread must have been created using fttl_thread_create with the isPersistent attribute set to TRUE. The thread can be identified in two ways; by thread_id or by name. The thread_id is the kernel assigned identifier for the thread which is returned by the fttl_thread_create function. If thread_id is NULL, the thread may be identified by name, a logical name assigned to the thread using the thread_set_name function. This allows an unrelated task to deactivate a persistent thread in the context, (i.e. the address space) of the task which defined the persistent thread.

The instance parameter is the unique instance number returned by the fttl_activate_persist_thread system call when the instance was scheduled. A thread may determine its own instance number by using the fttl_instance_self system call. If instance is zero then all instances of the specified thread will be removed.

PARAMETERS

thread_id The thread identifier returned by the fttl_thread_create function when the persistent thread was created. If this is NULL, name is used instead.
name The logical thread name as specified using the thread_set_name function. This is ignored unless thread_id is NULL.
instance The specific instance to be removed, or zero if all instances of thread_id are to be removed.

RETURN VALUE

KERN_SUCCESS The persistent thread specified by thread_id or name was successfully removed from the timeline.
KERN_INVALID_ARGUMENT Neither thread_id nor name specifies a valid persistent timeline thread.

RELATED INFORMATION

Functions:

rt_set_scheduling_policy, fttl_set_fault_flag, fttl_set_fault_interval, thread_set_name, fttl_thread_attribute_init, fttl_thread_create, fttl_instance_self, fttl_activate_persist_thread.