Re: [Boost-bugs] [Boost C++ Libraries] #10155: thread::physical_concurrency() always returns 0 on PowerPC

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10155: thread::physical_concurrency() always returns 0 on PowerPC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-30 19:15:29


#10155: thread::physical_concurrency() always returns 0 on PowerPC
-------------------------------------+-------------------------------------
  Reporter: Harris Munir | Owner: viboes
  <hamunir@…> | Status: assigned
      Type: Bugs | Component: thread
 Milestone: To Be Determined | Severity: Problem
   Version: Boost Release Branch | Keywords: thread, threads,
Resolution: | pthread, powerpc, ppc, power
-------------------------------------+-------------------------------------

Comment (by Harris Munir <hamunir@…>):

 Replying to [comment:1 viboes]:
> Hi,
>
> how to be sure that the check for {{{__powerpc__}}} is the good one?
> Do all the Linux PowerPC behave the same?

 Hello!

 All Linux PowerPC machines I have access to seem to behave this way.
 However, perhaps a safer solution would be to fall back to
 hardware_concurrency() when no "physical id" or "core id" entries are
 found in /proc/cpuinfo. I would implement this by returning the result of
 hardware_concurrency() instead of 0 within this block:

 https://github.com/boostorg/thread/blob/master/src/pthread/thread.cpp#L575-618

 If you think this is a good idea I would be happy to make a new pull
 request.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10155#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC