2018-06-05 19:44:40

by J. Neuschäfer

[permalink] [raw]
Subject: [PATCH] docs: atomic_ops: atomic_set is a write (not read) operation

Describe it as such.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
Documentation/core-api/atomic_ops.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-api/atomic_ops.rst
index 2e7165f86f55..724583453e1f 100644
--- a/Documentation/core-api/atomic_ops.rst
+++ b/Documentation/core-api/atomic_ops.rst
@@ -29,7 +29,7 @@ updated by one CPU, local_t is probably more appropriate. Please see
local_t.

The first operations to implement for atomic_t's are the initializers and
-plain reads. ::
+plain writes. ::

#define ATOMIC_INIT(i) { (i) }
#define atomic_set(v, i) ((v)->counter = (i))
--
2.17.1



2018-06-06 12:33:20

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] docs: atomic_ops: atomic_set is a write (not read) operation

On Tue, Jun 05, 2018 at 09:43:23PM +0200, Jonathan Neusch?fer wrote:
> Describe it as such.
>
> Signed-off-by: Jonathan Neusch?fer <[email protected]>

I have queued this, but if someone else would prefer to take it:

Reviewed-by: Paul E. McKenney <[email protected]>

> ---
> Documentation/core-api/atomic_ops.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-api/atomic_ops.rst
> index 2e7165f86f55..724583453e1f 100644
> --- a/Documentation/core-api/atomic_ops.rst
> +++ b/Documentation/core-api/atomic_ops.rst
> @@ -29,7 +29,7 @@ updated by one CPU, local_t is probably more appropriate. Please see
> local_t.
>
> The first operations to implement for atomic_t's are the initializers and
> -plain reads. ::
> +plain writes. ::
>
> #define ATOMIC_INIT(i) { (i) }
> #define atomic_set(v, i) ((v)->counter = (i))
> --
> 2.17.1
>


2018-06-29 14:29:57

by Andrea Parri

[permalink] [raw]
Subject: Re: [PATCH] docs: atomic_ops: atomic_set is a write (not read) operation

On Wed, Jun 06, 2018 at 01:07:56AM -0700, Paul E. McKenney wrote:
> On Tue, Jun 05, 2018 at 09:43:23PM +0200, Jonathan Neusch?fer wrote:
> > Describe it as such.
> >
> > Signed-off-by: Jonathan Neusch?fer <[email protected]>
>
> I have queued this, but if someone else would prefer to take it:
>
> Reviewed-by: Paul E. McKenney <[email protected]>

In the commit message of bb7d47b697116c ("docs: atomic_ops: Describe
atomic_set as a write operation") from your dev branch,

from "reads" to "writes"

Andrea


>
> > ---
> > Documentation/core-api/atomic_ops.rst | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-api/atomic_ops.rst
> > index 2e7165f86f55..724583453e1f 100644
> > --- a/Documentation/core-api/atomic_ops.rst
> > +++ b/Documentation/core-api/atomic_ops.rst
> > @@ -29,7 +29,7 @@ updated by one CPU, local_t is probably more appropriate. Please see
> > local_t.
> >
> > The first operations to implement for atomic_t's are the initializers and
> > -plain reads. ::
> > +plain writes. ::
> >
> > #define ATOMIC_INIT(i) { (i) }
> > #define atomic_set(v, i) ((v)->counter = (i))
> > --
> > 2.17.1
> >
>

2018-07-02 18:54:14

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] docs: atomic_ops: atomic_set is a write (not read) operation

On Fri, Jun 29, 2018 at 03:43:45PM +0200, Andrea Parri wrote:
> On Wed, Jun 06, 2018 at 01:07:56AM -0700, Paul E. McKenney wrote:
> > On Tue, Jun 05, 2018 at 09:43:23PM +0200, Jonathan Neusch?fer wrote:
> > > Describe it as such.
> > >
> > > Signed-off-by: Jonathan Neusch?fer <[email protected]>
> >
> > I have queued this, but if someone else would prefer to take it:
> >
> > Reviewed-by: Paul E. McKenney <[email protected]>
>
> In the commit message of bb7d47b697116c ("docs: atomic_ops: Describe
> atomic_set as a write operation") from your dev branch,
>
> from "reads" to "writes"

Good catch, fixed, thank you!

Thanx, Paul

> Andrea
>
>
> >
> > > ---
> > > Documentation/core-api/atomic_ops.rst | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-api/atomic_ops.rst
> > > index 2e7165f86f55..724583453e1f 100644
> > > --- a/Documentation/core-api/atomic_ops.rst
> > > +++ b/Documentation/core-api/atomic_ops.rst
> > > @@ -29,7 +29,7 @@ updated by one CPU, local_t is probably more appropriate. Please see
> > > local_t.
> > >
> > > The first operations to implement for atomic_t's are the initializers and
> > > -plain reads. ::
> > > +plain writes. ::
> > >
> > > #define ATOMIC_INIT(i) { (i) }
> > > #define atomic_set(v, i) ((v)->counter = (i))
> > > --
> > > 2.17.1
> > >
> >
>