NAME

fttl_activate_persist_thread - Activate an instance of a previously defined persistent timeline thread.

SYNOPSIS

kern_return_t fttl_activate_persist_thread(thread_id, name, st_time, ex_tim e, de_time, instance)

thread_t thread_id;
char * name;
timespec_t st_time;
timespec_t ex_time;
timespec_t de_time;
int * instance;

DESCRIPTION

The fttl_activate_persist_thread system call schedules an instance of a previously defined persistent timeline thread on 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 activate a persistent thread in the context, (i.e. the address space) of the task which defined the persistent thread.


The three timespec_t arguments specify the earliest start time, execution time and deadline for the new instance of the thread. The other attributes of the thread are unaffected by the fttl_activate_persist_thread call. The instance parameter is the address where the system can store a unique instance number identifying the new instance. A thread may determine its own innstance number by using the fttl_instance_self system call. This same number is used to identify an instance to be removed from the timeline in the fttl_deactivate_persist_thread system call. From the user's point of view, the scheduler treats the new instance in the same way as any other timeline thread.

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. 
st_time, ex_time, de_time  The start time, execution time and deadline of the activated thread instance. 
instance  The address where the instance number is to be returned. 

RETURN VALUE

KERN_SUCCESS The persistent thread specified by thread_id or name was successfully scheduled on the timeline. 
KERN_INVALID_ARGUMENT Neither thread_id nor name specifies a valid persistent timeline thread. 
KERN_INVALID_VALUE One or more of the timespec_t values specified by st_time, ex_time and de_time are illegal. 
KERN_FAILURE The scheduler couldn't guarantee the execution of the thread within its deadline. 

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_deactivate_persist_thread.