Rate This Document
Findability
Accuracy
Completeness
Readability

HTL_thread_executor_set_scheduler

Sets the scheduler of an executor by scheduler type.

Interface Definition

int HTL_thread_executor_set_scheduler(HTL_thread_executor_t executor, HTL_thread_scheduler_type_t sched_type, HTL_thread_pool_t *thread_pools, int pool_count);

Description

HTL_thread_executor_set_scheduler() is used to set the scheduler of the executor to a specified type (sched_type).

Parameters

Parameter

Type

Description

Input/Output

executor

HTL_thread_executor

Handle to the executor.

Input

sched_type

HTL_thread_scheduler_type_t

Predefined scheduler.

Input

thread_pools

HTL_thread_pool_t *

Address to the thread pools.

Input

pool_count

int

Number of pools.

Input

Return Value

  • HTL_THREAD_SUCCESS: success.
  • Other values: failure. For details, see the error code descriptions.

Example

1
2
    HTL_thread_executor_self(&executors[0]);
    HTL_thread_executor_set_scheduler(executors[0], HTL_THREAD_SCHEDULER_DEFAULT, &pools[0], 1);