C++ Logo


Advanced search

Re: Synchronization of atomic notify and wait

From: Marcin Jaczewski <marcinjaczewski86_at_[hidden]>
Date: Tue, 19 Jul 2022 13:00:02 +0200
wt., 19 lip 2022 o 12:51 <language.lawyer_at_[hidden]> napisaƂ(a):
> On 19/07/2022 15:43, Marcin Jaczewski wrote:
> > it's not term but definition that is used further:
> It *is* a term which *has* a definition.
> > "Effects: Unblocks the execution of at least one atomic waiting
> > operation on *ptr that is eligible to be unblocked ([atomics.wait]) by
> > this call, if any such atomic waiting operations exist."
> >
> > And now its requirement.
> I don't get how the use of a term makes it (its definition?) a requirement.
> BTW, you might have noticed that I've rewritten std::atomic::notify_one /Effects/ using new term /hairy/. std::atomic_ref::notify_one can be changed similarly.

Even if you name it X it still holds, "if something is in state X,
then will be unblocked". Was `wait` in state X?
In previous messages it was clearly show that `wait` was in state X
and by specyficacton of `notify` it should be unblock.

Received on 2022-07-19 11:00:13