GCC 11.1 Release Candidate available from gcc.gnu.org

David Edelsohn dje.gcc@gmail.com
Wed Apr 21 14:23:03 GMT 2021


Hi, Jonathan

Thanks for the further investigation.  I definitely encountered the
missing _M_try_acquire in __platform_semaphore.

Thanks, David

On Wed, Apr 21, 2021 at 8:12 AM Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On 21/04/21 12:38 +0100, Jonathan Wakely wrote:
> >On 20/04/21 22:12 -0700, Thomas Rodgers wrote:
> >>@@ -86,6 +88,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> >>      }
> >>    }
> >>
> >>+    _GLIBCXX_ALWAYS_INLINE bool
> >>+    _M_try_acquire() noexcept
> >>+    {
> >>+      for (;;)
> >>+     {
> >>+       auto __err = sem_trywait(&_M_semaphore);
> >>+       if (__err && (errno == EINTR))
> >>+         continue;
> >>+       else if (__err && (errno == EAGAIN))
> >>+         return false;
> >>+       else if (__err)
> >>+         std::terminate();
> >>+       else
> >>+         break;
> >>+     }
> >>+      return true;
> >>+    }
> >>+
> >>    _GLIBCXX_ALWAYS_INLINE void
> >>    _M_release(std::ptrdiff_t __update) noexcept
> >>    {
> >
> >Please just commit this part to trunk and gcc-11, not the macro
> >renaming (as that's been fixed by Jakub already).
>
> I think on trunk I'd prefer to do the attached. WDYT?
>
>


More information about the Libstdc++ mailing list