[m-rev.] Parallel runtime thread pinning.

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Aug 25 02:15:52 AEST 2009


Hi,

On Mon, 24 Aug 2009, Paul Bone wrote:

>>> +mercury_check_for_declarations "_SC_NPROCESSORS_ONLN"
>>
>> Can't you just use #ifdef _SC_NPROCESSORS_ONLN in the source code?
>
> It's not clear if this will be defined as a macro or as an enum or other
> constant.  Using an #ifdef in the source code won't work for emums.  I'll add a
> comment describing this rationale.
>
> I'd be surprised if these weren't macros.  If anyone knows for sure if such an
> assumption is safe please let me know.

sysconf() is posix and the parameters for it that are a part of posix
*must* be macros.  It is extremely improbable that any non-standard
parameters like this one would be defined using an enum.

It will be sufficient to use the #ifdef here - it will also avoid
yet more clutter in the configure script.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list