Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit073082b

Browse files
committed
Fix comment atomics.h.
I appear to accidentally have switched the comments forpg_atomic_write_u32 and pg_atomic_read_u32 around. Also fix some minortypos I found while fixing.Noticed-By: Amit KapilaBackpatch: 9.5
1 parent1b5d34c commit073082b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/include/port/atomics.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* new platform. If no such generic implementation is available spinlocks (or
1919
* even OS provided semaphores) will be used to implement the API.
2020
*
21-
* Implement the _u64variantes if and only if your platform can use them
21+
* Implement the _u64variants if and only if your platform can use them
2222
* efficiently (and obviously correctly).
2323
*
2424
* Use higher level functionality (lwlocks, spinlocks, heavyweight locks)
@@ -46,7 +46,7 @@
4646
*
4747
* These files can provide the full set of atomics or can do pretty much
4848
* nothing if all the compilers commonly used on these platforms provide
49-
*useable generics.
49+
*usable generics.
5050
*
5151
* Don't add an inline assembly of the actual atomic operations if all the
5252
* common implementations of your platform provide intrinsics. Intrinsics are
@@ -280,10 +280,12 @@ pg_atomic_init_u32(volatile pg_atomic_uint32 *ptr, uint32 val)
280280
}
281281

282282
/*
283-
*pg_atomic_write_u32 - unlockedwrite to atomic variable.
283+
*pg_atomic_read_u32 - unlockedread from atomic variable.
284284
*
285-
* The write is guaranteed to succeed as a whole, i.e. it's not possible to
286-
* observe a partial write for any reader.
285+
* The read is guaranteed to return a value as it has been written by this or
286+
* another process at some point in the past. There's however no cache
287+
* coherency interaction guaranteeing the value hasn't since been written to
288+
* again.
287289
*
288290
* No barrier semantics.
289291
*/
@@ -295,12 +297,10 @@ pg_atomic_read_u32(volatile pg_atomic_uint32 *ptr)
295297
}
296298

297299
/*
298-
*pg_atomic_read_u32 - unlockedread from atomic variable.
300+
*pg_atomic_write_u32 - unlockedwrite to atomic variable.
299301
*
300-
* The read is guaranteed to return a value as it has been written by this or
301-
* another process at some point in the past. There's however no cache
302-
* coherency interaction guaranteeing the value hasn't since been written to
303-
* again.
302+
* The write is guaranteed to succeed as a whole, i.e. it's not possible to
303+
* observe a partial write for any reader.
304304
*
305305
* No barrier semantics.
306306
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp