This is the mail archive of the gcc-patches@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]

Re: ping [PATCH] Fix a deadlock bug in static variable initialization in libsupc++


Eric Botcazou wrote:
2007-09-13 Doug Kwan <dougkwan@google.com>

        * gcc/gthr-posix.h (__gthread_cond_broadcast, __gthread_cond_wait,
          __gthread_cond_wait_recursive, __gthread_self, __gthread_equal):
          Add to extend interface for POSIX conditional variables.
          (__GTHREAD_HAS_COND): Macro defined to signify support of
          conditional variables.

Is this supported by POSIX 95? If so, gthr-posix95.h should be updated too.

The condition variable stuff is part of 1003.1c-1995, yes. I assume that's what you mean by POSIX 95. You should be able to just apply the same changes to gthr-posix95.h.


! get_static_cond().wait_recursive(&get_static_mutex());

Not a big deal, but you should be able to just use wait_recursive(static_mutex) here. Whichever you prefer.


The patch is OK with the update to gthr-posix95.h; I imagine Eric will let you know if it breaks for some reason.

Jason


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