Differences From Artifact [965a4d4675]:
- File
src/atomic_powerpc.h
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 6998) [annotate] [blame] [check-ins using]
To Artifact [3babc72639]:
- File src/atomic_powerpc.h — part of check-in [48ffea9a9a] at 2017-04-13 13:19:02 on branch trunk — Clean up memory barriers (user: js, size: 6730) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
10 11 12 13 14 15 16 | * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ | < < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ static OF_INLINE int of_atomic_int_add(volatile int *_Nonnull p, int i) { __asm__ __volatile__ ( "0:\n\t" "lwarx %0, 0, %2\n\t" "add %0, %0, %1\n\t" |
︙ | ︙ | |||
356 357 358 359 360 361 362 | : "cc" ); return r; } static OF_INLINE void | | | | | | | < < < < < < < < < < < < < < < < < < | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | : "cc" ); return r; } static OF_INLINE void of_memory_barrier(void) { __asm__ __volatile__ ( "lwsync" ::: "memory" ); } static OF_INLINE void of_memory_barrier_acquire(void) { __asm__ __volatile__ ( "lwsync" ::: "memory" ); } static OF_INLINE void of_memory_barrier_release(void) { __asm__ __volatile__ ( "lwsync" ::: "memory" ); } |