Opened 14 years ago

Closed 12 years ago

#2053 closed Patches (fixed)

porting boost to avr32 linux platform

Reported by: anonymous Owned by: Anthony Williams
Milestone: Boost 1.42.0 Component: thread
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:

Description

Hi,

In threap.cpp the get_nprocs function is used. However this function is not implemented on several platforms(gnu extension) also not in ulibc. Therefore it would be better to take the SYSINFO() macro which is portable on all platforms.

Guy

Attachments (1)

pthread-prefer-posix.patch (664 bytes ) - added by Mike Frysinger <vapier@…> 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by guyvo@…, 14 years ago

port to avr32

comment:2 by Mike Frysinger <vapier@…>, 14 years ago

this really isnt avr32 specific at all ... imo, the pthread file should default to the POSIX implementation by default and only fall back to get_nprocs() for linux

i'll post a patch against 1.37.0 for the issue

by Mike Frysinger <vapier@…>, 14 years ago

Attachment: pthread-prefer-posix.patch added

comment:3 by felix.nawothnig@…, 13 years ago

Milestone: Boost 1.36.0
Version: Boost 1.35.0Boost 1.40.0

Although the attached patch is an improvement in my opinion it's still not correct - get_nprocs() is a glibc extension, it has nothing to do with linux really...

Jump version to 1.40.0 (still present).

comment:4 by Mike Frysinger <vapier@…>, 13 years ago

some Linux C libs implement get_nprocs() because glibc does it. at any rate, it doesnt really matter because any sane Linux C library will hit the POSIX code first thus making the issue moot.

comment:5 by viboes, 13 years ago

Component: threadsthread
Milestone: Boost 1.42.0

I purpose to change the ticket title: Use of non portable get_nprocs on avr32 linux.

Maybe it would be a good idea to provide this function in a portable way, but which library should include it? I guess that Oliver K. has the same issue on Boost.Task.

comment:6 by Anthony Williams, 12 years ago

Resolution: fixed
Status: newclosed

This no longer applies to the current trunk code (fixed in revision 54408)

Note: See TracTickets for help on using tickets.