API Reference Manual  1.45.0
odp_timer_pool_param_t Struct Reference

Timer pool parameters. More...

#include <timer_types.h>

Collaboration diagram for odp_timer_pool_param_t:
[legend]

Data Fields

odp_timer_type_t timer_type
 Timer type. More...
 
odp_timer_clk_src_t clk_src
 Clock source for timers. More...
 
odp_timer_exp_mode_t exp_mode
 Timer expiration mode. More...
 
uint64_t res_ns
 Timeout resolution in nanoseconds. More...
 
uint64_t res_hz
 Timeout resolution in hertz. More...
 
uint64_t min_tmo
 Minimum relative timeout in nanoseconds. More...
 
uint64_t max_tmo
 Maximum relative timeout in nanoseconds. More...
 
struct {
   odp_fract_u64_t   base_freq_hz
 Timer pool base frequency in hertz. More...
 
   uint64_t   max_multiplier
 Maximum base frequency multiplier. More...
 
periodic
 Periodic timer parameters. More...
 
uint32_t num_timers
 Number of timers in the pool.
 
int priv
 Thread private timer pool. More...
 

Detailed Description

Field Documentation

◆ timer_type

odp_timer_type_t odp_timer_pool_param_t::timer_type

Timer type.

Select whether the pool is created for single shot (ODP_TIMER_TYPE_SINGLE) or periodic (ODP_TIMER_TYPE_PERIODIC) timers. All timers in a pool are of the same type. Timer capabilities specify how many pools of each type are supported.

The default value is ODP_TIMER_TYPE_SINGLE.

Examples
odp_timer_accuracy.c.

Definition at line 293 of file api/spec/timer_types.h.

◆ clk_src

odp_timer_clk_src_t odp_timer_pool_param_t::clk_src

Clock source for timers.

The default value is ODP_CLOCK_DEFAULT.

Examples
odp_bench_timer.c, odp_debug.c, odp_sched_pktio.c, odp_stress.c, odp_sysinfo.c, odp_timer_accuracy.c, odp_timer_perf.c, and odp_timer_simple.c.

Definition at line 298 of file api/spec/timer_types.h.

◆ exp_mode

odp_timer_exp_mode_t odp_timer_pool_param_t::exp_mode

Timer expiration mode.

The default value is ODP_TIMER_EXP_AFTER.

Definition at line 303 of file api/spec/timer_types.h.

◆ res_ns

uint64_t odp_timer_pool_param_t::res_ns

Timeout resolution in nanoseconds.

Timer pool must serve timeouts with this or higher resolution. The minimum valid value (highest resolution) is defined by timer resolution capability. When this parameter is used, set 'res_hz' to zero. The default value is zero.

Examples
odp_bench_timer.c, odp_debug.c, odp_sched_pktio.c, odp_stress.c, odp_sysinfo.c, odp_timer_accuracy.c, odp_timer_perf.c, and odp_timer_simple.c.

Definition at line 309 of file api/spec/timer_types.h.

◆ res_hz

uint64_t odp_timer_pool_param_t::res_hz

Timeout resolution in hertz.

This may be used to specify the highest required resolution in hertz instead of nanoseconds. When this parameter is used, set 'res_ns' to zero. The default value is zero.

Examples
odp_timer_accuracy.c.

Definition at line 314 of file api/spec/timer_types.h.

◆ min_tmo

uint64_t odp_timer_pool_param_t::min_tmo

Minimum relative timeout in nanoseconds.

All requested timeouts will be at least this many nanoseconds after the current time of the timer pool. Timer set functions return an error, if too short timeout was requested. The value may be also smaller than the requested resolution.

The default value is zero. Ignored when timer type is periodic.

Examples
odp_bench_timer.c, odp_debug.c, odp_sched_pktio.c, odp_stress.c, odp_sysinfo.c, odp_timer_accuracy.c, odp_timer_perf.c, and odp_timer_simple.c.

Definition at line 324 of file api/spec/timer_types.h.

◆ max_tmo

uint64_t odp_timer_pool_param_t::max_tmo

Maximum relative timeout in nanoseconds.

All requested timeouts will be at most this many nanoseconds after the current time of the timer pool. Timer set functions return an error, if too long timeout was requested.

Ignored when timer type is periodic.

Examples
odp_bench_timer.c, odp_debug.c, odp_sched_pktio.c, odp_stress.c, odp_sysinfo.c, odp_timer_accuracy.c, odp_timer_perf.c, and odp_timer_simple.c.

Definition at line 334 of file api/spec/timer_types.h.

◆ base_freq_hz

odp_fract_u64_t odp_timer_pool_param_t::base_freq_hz

Timer pool base frequency in hertz.

A periodic timer pool has a base frequency. Each timer of the pool has an expiration frequency that is an integer multiple of the base frequency. Depending on the implementation, base frequency may need to be selected carefully to avoid timer periods to drift against the source clock. Use odp_timer_periodic_capability() to check base frequency support, and resulting max_multiplier and resolution values.

Fraction part of the value is always less than one, see odp_timer_periodic_capability_t::base_freq_hz for details. The default value is zero.

An example with two timer frequencies: base_freq_hz.integer = 33333, .numer = 1, .denom = 3 max_multiplier = 30 timer A: freq_multiplier = 2 timer frequency: 2 * 33333 1/3 Hz = 66.6666..kHz timer B: freq_multiplier = 30 timer frequency: 30 * 33333 1/3 Hz = 1 MHz

Examples
odp_timer_accuracy.c.

Definition at line 362 of file api/spec/timer_types.h.

◆ max_multiplier

uint64_t odp_timer_pool_param_t::max_multiplier

Maximum base frequency multiplier.

This is the maximum base frequency multiplier value (odp_timer_periodic_start_t::freq_multiplier) for any timer in the pool.

Examples
odp_timer_accuracy.c.

Definition at line 369 of file api/spec/timer_types.h.

◆ 

struct { ... } odp_timer_pool_param_t::periodic

Periodic timer parameters.

Additional parameters for periodic timers. Ignored when timer type is single shot.

Examples
odp_timer_accuracy.c.

◆ priv

int odp_timer_pool_param_t::priv

Thread private timer pool.

When zero, multiple thread may use the timer pool concurrently. When non-zero, only single thread uses the timer pool (concurrently). The default value is zero.

Examples
odp_timer_perf.c, and odp_timer_simple.c.

Definition at line 379 of file api/spec/timer_types.h.


The documentation for this struct was generated from the following file: