public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* std::atomic<std::shared_ptr> lockfree
@ 2023-08-03 12:33 Bogdan Sinitsyn
  2023-08-04  8:07 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Bogdan Sinitsyn @ 2023-08-03 12:33 UTC (permalink / raw)
  To: gcc-help

std::atomic<std::shared_ptr<T>> operations seem to generate lock-free 
code without _Sp_locker and mutexes, while
std::atomic_*(std::shared_ptr<T>*) operations use _Sp_locker. But 
std::atomic_is_lock_free and std::atomic::is_lock_free
show exactly the opposite. Maybe I don't interpret that correctly? What 
does that supposed to mean?

https://godbolt.org/z/818v6sMGb

--

Bogdan Sinisyn


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-04  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-03 12:33 std::atomic<std::shared_ptr> lockfree Bogdan Sinitsyn
2023-08-04  8:07 ` Jonathan Wakely
2023-08-04  8:18   ` Bogdan Sinitsyn
2023-08-04  8:24     ` Jonathan Wakely
2023-08-04  8:22   ` Jonathan Wakely

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).