This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-05-05
         AssignedTo|unassigned at gcc dot       |redi at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-05 17:40:29 UTC ---
Created attachment 27319
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27319
handle aix thread model

Ah, I see.  gthr-aix.h just does:

#ifdef _THREAD_SAFE
#include "gthr-posix.h"
#else
#include "gthr-single.h"
#endif

So it has everything in the posix thread model except the timedlock functions,
but doesn't match the case statement that only looks for "posix".

Your suggestion would work for the posix and aix thread models, but would break
e.g. win32, where _PTHREADS won't be defined but mutexes always support
timeouts (not that anyone has actually added __ghtread_mutex_timedlock to
gthr-win32.h yet, but they should do)

I think the right thing to do is define _PTHREADS for the aix thread model,
could you test this patch?  I've assumed that _THREAD_SAFE might be needed to
enable some thread-related features on AIX, I don't know if that's true.

An alternative patch would simply change  the case statement to match
posix|aix)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]