lkml.org 
[lkml]   [2019]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 2/2] docs: ftrace: Fix typos
On Mon, 25 Nov 2019 12:37:09 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Sun, 24 Nov 2019 23:38:41 -0500
> "Frank A. Cancio Bello" <frank@generalsoftwareinc.com> wrote:
>
> > --- a/Documentation/trace/ring-buffer-design.txt
> > +++ b/Documentation/trace/ring-buffer-design.txt
> > @@ -37,7 +37,7 @@ commit_page - a pointer to the page with the last finished non-nested write.
> >
> > cmpxchg - hardware-assisted atomic transaction that performs the following:
> >
> > - A = B iff previous A == C
> > + A = B if previous A == C
>
> This wasn't a typo. "iff" means "if and only if" which is a standard
> notation. That is, this is shorthand for:
>
> A = B if previous A == C
> previous A == C if A = B

Although thinking about this more, this may not be correct. If
previous A == B, then A = B, thus the "iff" notation is not actually
accurate.

This wouldn't then be a typo fix, but a real fix to the logic ;-)

-- Steve

>
>
> >
> > R = cmpxchg(A, C, B) is saying that we replace A with B if and only if
> > current A is equal to C, and we put the old (current) A into R
> > --

\
 
 \ /
  Last update: 2019-11-25 22:47    [W:0.049 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site