Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #88390
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Christmas Quiz... |
| Date | 2023-01-04 00:41 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <tp3e46$2e2oe$3@dont-email.me> (permalink) |
| References | <tod3b8$3c8u8$4@dont-email.me> <todqib$3hkat$3@dont-email.me> <tp3e1c$2dmo3$9@dont-email.me> |
On 1/4/2023 12:40 AM, Chris M. Thomasson wrote: > On 12/26/2022 7:59 PM, Bonita Montero wrote: >> Am 26.12.2022 um 22:22 schrieb Chris M. Thomasson: >>> Imagine you are on a SPARC in RMO mode, you are programming in >>> assembly language. What memory barrier instruction is the most >>> efficient _and_ correct for use _after_ using an atomic RMW >>> instruction to take exclusive access? Think about locking a mutex... >>> >>> A: MEMBAR #LoadLoad >>> >>> B: MEMBAR #LoadStore | #LoadLoad >>> >>> C: MEMBAR #StoreLoad | #LoadLoad >>> >>> D: MEMBAR #StoreLoad | #StoreStore >>> >>> >>> What about the membar we have to use before atomically unlocking this >>> mutex? >>> >>> >>> A: MEMBAR #LoadLoad >>> >>> B: MEMBAR #StoreLoad | #LoadLoad >>> >>> C: MEMBAR #LoadStore | #StoreStore >>> >>> D: MEMBAR #StoreLoad | #StoreStore >> >> 1. I use proper C++ barriers so I won't have to care for that. >> 2. SPARCĀ is dead. >> > > What are the proper C++ barriers then? Too easy? Well, how to you implement them on a weakly ordered system? A SPARC in RMO mode is a good place to start.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-26 13:22 -0800
Re: Christmas Quiz... "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-12-26 23:17 +0100
Re: Christmas Quiz... Bonita Montero <Bonita.Montero@gmail.com> - 2022-12-27 04:59 +0100
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 13:29 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:40 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:41 -0800
Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 03:38 -0800
Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 03:42 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 13:31 -0800
Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 14:09 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 14:17 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-29 20:42 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:38 -0800
Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-17 18:25 -0800
csiph-web