Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1306812 > unrolled thread

Proposal for new memory_order_consume definition

Started by"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
First post2016-01-12 00:20 +0100
Last post2016-01-12 00:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  Proposal for new memory_order_consume definition "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-12 00:20 +0100

#1306812 — Proposal for new memory_order_consume definition

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-01-12 00:20 +0100
SubjectProposal for new memory_order_consume definition
Message-ID<qPTUK-Ti-23@gated-at.bofh.it>
Hello!

As requested at the October 2015 C++ Standards Committee Meeting, I have
created a single proposal for memory_order_consume in C++:

http://www2.rdrop.com/users/paulmck/submission/consume.2016.01.11b.pdf

This contains an informal description of the proposal, rough-draft
wording changes, and a number of litmus tests demonstrating how the
proposal works.

The required changes to compilers appears to be extremely small,
however, I would like to get more compiler writers' thoughts on the
pointer_cmp_eq_dep(), pointer_cmp_ne_dep(), pointer_cmp_gt_dep(),
pointer_cmp_ge_dep(), pointer_cmp_lt_dep(), and pointer_cmp_le_dep()
intrinsics that do pointer comparisons without breaking dependencies on
their first argument.  Figures 25 and 26 on page 16 demonstrate their use.
These intrinsics were suggested at the October meeting, but it would be
good to get wider feedback on them.

Note that last I checked, the Linux kernel actually does not depend
on pointer comparisons not breaking dependency chains, because all
comparisons are against NULL or a list-head structure, in which case
the pointer is not going to be dereferenced after an equals comparison.
But I do believe that some past versions of the Linux kernel have depended
on this.

Thoughts?

							Thanx, Paul

PS.  For more background information, please see:

	http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0098r0.pdf

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web