public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: Thomas Rodgers <trodgers@redhat.com>,
	gcc-patches@gcc.gnu.org,	libstdc++@gcc.gnu.org
Subject: Re: [PATCH] Add c++2a binary_semaphore
Date: Tue, 25 Feb 2020 12:39:00 -0000	[thread overview]
Message-ID: <20200225123915.GI9441@redhat.com> (raw)
In-Reply-To: <20200225123346.GH9441@redhat.com>

On 25/02/20 12:33 +0000, Jonathan Wakely wrote:
>On 25/02/20 09:52 +0100, Sebastian Huber wrote:
>>Hello Thomas,
>>
>>some operating systems provide already an implementation of binary 
>>semaphores with a compatible API, e.g. RTEMS. It would be nice if I 
>>could use it in libstdc++. I guess you don't want to have #ifdef 
>>__rtems__ stuff in this code. What about defining a binary semaphore 
>>API for gthr.h and then implement the optional futex support in 
>>libgcc/gthr-posix.h?
>
>gthr.h is supposed to be an abstraction of pthreads, not futexes. I
>also don't see why more libstdc++ code should live in libgcc than
>necessary.
>
>It would be OK to add semaphore support to gthr-*.h and then have
>libstdc++ either use futexes (where available) or the gthr code.

Note however, that any additions to gthr.h are out of scope for GCC
10, as we're already in stage 4.

Local additions to libstdc++ for experimental C++20 features are still
OK now.

  reply	other threads:[~2020-02-25 12:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <381004109.5930741.1582008200673.JavaMail.zimbra@redhat.com>
2020-02-18  6:46 ` Thomas Rodgers
2020-02-18 13:49   ` Sebastian Huber
2020-02-18 14:31     ` Jonathan Wakely
2020-02-21 12:33       ` Sebastian Huber
2020-02-18 14:25   ` Jonathan Wakely
2020-02-20  3:19     ` Thomas Rodgers
2020-02-25  2:53       ` Thomas Rodgers
2020-02-25  8:53         ` Sebastian Huber
2020-02-25 12:33           ` Jonathan Wakely
2020-02-25 12:39             ` Jonathan Wakely [this message]
2020-02-26 16:07         ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200225123915.GI9441@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=sebastian.huber@embedded-brains.de \
    --cc=trodgers@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).