From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: Thomas Rodgers <trodgers@redhat.com>,
gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH] Add c++2a binary_semaphore
Date: Fri, 21 Feb 2020 12:33:00 -0000 [thread overview]
Message-ID: <06907739-5769-68c9-acb3-8b5577e4ac34@embedded-brains.de> (raw)
In-Reply-To: <20200218143055.GE9441@redhat.com>
On 18/02/2020 15:30, Jonathan Wakely wrote:
> On 18/02/20 14:48 +0100, Sebastian Huber wrote:
>> Hello,
>>
>> On 18/02/2020 07:46, Thomas Rodgers wrote:
>>> This patch adds the c++2a semaphore header and binary_semaphore type.
>>> The implementation is not complete, this patch is just to solicit
>>> initial feedback.
>>
>> how do you plan to implement the binary semaphores? For example, do
>> you want to add the binary semaphores to gthr.h or via a mutex and a
>> condition variable or via some futex stuff? I ask because I would like
>> to support this in RTEMS.
>
> Futexes where possible.
It would be nice if this could be done through an extension of the
gthr.h API similar to the condition variables (__GTHREAD_HAS_COND).
> Using POSIX semaphores might be a good alternative for the
> std::counting_semaphore type,
Yes.
> but for std::binary_semaphore we talked
> about just using a spinlock based on std::atomic.
I would like to use the binary semaphores for task/interrupt
synchronization. For this a blocking solution is required.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
next prev parent reply other threads:[~2020-02-21 12:33 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 [this message]
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
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=06907739-5769-68c9-acb3-8b5577e4ac34@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
--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).