Modify

Ticket #12744 (closed Bugs: fixed)

Opened 4 months ago

Last modified 3 months ago

winapi::set_timer_resolution inadvertently changes timer resolution (Windows)

Reported by: Terry Kim <yuminkim@…> Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.63.0 Severity: Problem
Keywords: timer resolution Cc:

Description

boost::interprocess::ipcdetail::spin_wait calls get_system_tick_in_highres_counts(), which ultimately calls winapi::set_timer_resolution() to get the current timer resolution. However, this changes the timer resolution inadvertently.

I verified this with PwrTest?.exe (https://msdn.microsoft.com/windows/hardware/drivers/devtest/pwrtest).

Can we use winapi::query_timer_resolution() instead of winapi::set_timer_resolution()?

Attachments

Change History

comment:1 Changed 3 months ago by igaztanaga

In theory the second parameter is set_timer_resolution is zero, which should not change the current resolution. But if you verified the change, then your suggestion seems the right way to go.

comment:2 Changed 3 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.