Opened 8 years ago

Closed 8 years ago

#10824 closed Bugs (fixed)

Boost.Thread 1.57 breaks Windows XP compatibility for SP2 and below.

Reported by: felixbruns@… Owned by: timblechmann
Milestone: Boost 1.58.0 Component: thread
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc: timblechmann

Description

The commit 04e3d918 [1] introduced a call to GetLogicalProcessorInformation [2], which is only supported on Windows XP SP3 (or x64) and above.

Is Windows XP SP2 support officially dropped or was this an unintentional break?


(Can't submit direct links because of spam protection)

(1): github.com/boostorg/thread/commit/04e3d918fbf31792b6553d6cc2002214ea671aa9

(2): msdn.microsoft.com/en-us/library/windows/desktop/ms683194%28v=vs.85%29.aspx

Change History (7)

comment:1 by viboes, 8 years ago

Owner: changed from Anthony Williams to timblechmann

I think it would be good that physical_concurrency calls hardware_concurrency if it can not be implemented.

Tim please, could you take care of this issue?

Last edited 8 years ago by viboes (previous) (diff)

comment:2 by timblechmann, 8 years ago

not intentional. vicente, thinking about a good fallback, i'd actually prefer to return 0 instead of calling hardware_concurrency: the reason is simple: code that depends on distinguishing the number of physical and the number of virtual processors, can rely on this. if it returns 0, the user can call hardware_concurrency.

comment:3 by viboes, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0

Ok, no problem.

Felix, does the following covers your expectations https://github.com/boostorg/thread/pull/32 ?

Thanks Tim.

comment:4 by Felix Bruns <felixbruns@…>, 8 years ago

Thanks for the quick fix! :-)

comment:5 by viboes, 8 years ago

Resolution: fixed
Status: newclosed

comment:6 by anonymous, 8 years ago

Resolution: fixed
Status: closedreopened

If I'm not mistaken, comments are not allowed after the backslash in mutliline macros, so the line

|| ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \ // a bit too strict: Windows XP with SP3 would be sufficient

will fail to compile (at least does in VS2010).

Note: See TracTickets for help on using tickets.