Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #145984
| From | Philipp Klaus Krause <pkk@spth.de> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Example uses for read-modify-write operations? |
| Date | 2019-09-04 14:33 +0200 |
| Organization | solani.org |
| Message-ID | <qkoav1$3jf$1@solani.org> (permalink) |
| References | <qknvks$rgm$2@solani.org> <MAMbF.78233$gN2.1096@fx31.iad> <qko70n$r2$2@solani.org> <QTNbF.376844$AR4.14415@fx39.iad> |
Am 04.09.19 um 14:13 schrieb Clifford Heath: > > Perhaps so, but anything that allows you to do a mutex allows you to > build everything else. Less efficiently, it's true (I used C&S) but still. Though the mutex you get from fetch-and-add has a limit on the number of threads waiting on it before it breaks (the maximum value of the underlying data type), but I don't see that as a big restriction. On the other hand, with a mutex, the things you build are no longer wait-free (and Herlihy requires this property). From the C perspective: You can build a lockless atomic (i.e. one that can be used safely from signal handlers) easily with CAS, but not with a mutex (unless there are certain restrictions on signal handlers beyond what the C standard states). Philipp
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Example uses for read-modify-write operations? Philipp Klaus Krause <pkk@spth.de> - 2019-09-04 11:20 +0200
Re: Example uses for read-modify-write operations? Clifford Heath <no.spam@please.net> - 2019-09-04 20:44 +1000
Re: Example uses for read-modify-write operations? Philipp Klaus Krause <pkk@spth.de> - 2019-09-04 13:26 +0200
Re: Example uses for read-modify-write operations? Clifford Heath <no.spam@please.net> - 2019-09-04 22:13 +1000
Re: Example uses for read-modify-write operations? Philipp Klaus Krause <pkk@spth.de> - 2019-09-04 14:33 +0200
Re: Example uses for read-modify-write operations? already5chosen@yahoo.com - 2019-09-04 05:14 -0700
Re: Example uses for read-modify-write operations? Philipp Klaus Krause <pkk@spth.de> - 2019-09-04 14:35 +0200
Re: Example uses for read-modify-write operations? mark.bluemel@gmail.com - 2019-09-04 08:24 -0700
Re: Example uses for read-modify-write operations? already5chosen@yahoo.com - 2019-09-04 08:37 -0700
Re: Example uses for read-modify-write operations? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-04 17:10 +0100
Re: Example uses for read-modify-write operations? Bonita Montero <Bonita.Montero@gmail.com> - 2019-09-04 14:28 +0200
csiph-web