Add a vector of tw_timer_wheel_xxx_t *’s to e.g. my_main_t. Vec_validate (...) 
so you have one wheel per thread. Initialize all of the wheels.

Use e.g. vm->thread_index or os_get_cpu_index(..) to pick the wheel to process 
and/or use to start/stop timers.


From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of hari_akkin via 
Lists.Fd.Io
Sent: Monday, June 17, 2019 11:37 AM
To: vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] timer wheel usage queries

Hi Dave,
Thanks for the quick response.
Can you please point me how to tie a timer wheel to a thread?

thanks
Hari
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13300): https://lists.fd.io/g/vpp-dev/message/13300
Mute This Topic: https://lists.fd.io/mt/32039603/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to