Rate This Document
Findability
Accuracy
Completeness
Readability

HTL_thread_scheduler_get_pools

Obtains the thread pools associated with a specified scheduler.

Interface Definition

int HTL_thread_scheduler_get_pools(HTL_thread_scheduler_t scheduler, int max_pool_count, int index, HTL_thread_pool_t *thread_pools);

Description

HTL_thread_scheduler_get_pools() obtains the thread pools associated with a specified scheduler. The pool index starts from index. A maximum of max_pools can be obtained.

Parameters

Parameter

Type

Description

Input/Output

scheduler

HTL_thread_scheduler_t

Handle to the scheduler.

Input

max_pool_count

int

Maximum number of pools that can be obtained.

Input

index

int

The first pool index.

Input

thread_pools

HTL_thread_pool_t *

Array of pool handles.

Output

Return Value

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

Example

    HTL_thread_scheduler_t scheduler
    int num_pools;
    HTL_thread_pool_t *pools;
    HTL_thread_scheduler_get_pool_count(scheduler, &num_pools);
    pools = (HTL_thread_pool_t *)malloc(num_pools * sizeof(HTL_thread_pool_t));
    HTL_thread_scheduler_get_pools(scheduler, num_pools, 0, pools);