projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s390: uatomic add missing xchg return
[urcu.git]
/
urcu
/
uatomic_arch_sparc64.h
diff --git
a/urcu/uatomic_arch_sparc64.h
b/urcu/uatomic_arch_sparc64.h
index 87deacd1a064366bceb799cf8620485c06ba6206..622fe100e8f47627b3232acd67dbe5e27bef2e80 100644
(file)
--- a/
urcu/uatomic_arch_sparc64.h
+++ b/
urcu/uatomic_arch_sparc64.h
@@
-24,7
+24,7
@@
#include <urcu/system.h>
#ifndef __SIZEOF_LONG__
#include <urcu/system.h>
#ifndef __SIZEOF_LONG__
-#if
(defined(__sparc_v8__) || defined(__sparc_v9__))
+#if
def __LP64__
#define __SIZEOF_LONG__ 8
#else
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG__ 8
#else
#define __SIZEOF_LONG__ 4
@@
-90,9
+90,9
@@
unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
switch (len) {
case 4:
{
switch (len) {
case 4:
{
- unsigned int old;
+ unsigned int old
, oldt
;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read(
(unsigned int *)
addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 4);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 4);
@@
-103,9
+103,9
@@
unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
#if (BITS_PER_LONG == 64)
case 8:
{
#if (BITS_PER_LONG == 64)
case 8:
{
- unsigned long old;
+ unsigned long old
, oldt
;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read(
(unsigned long *)
addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 8);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 8);
@@
-126,15
+126,14
@@
unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
/* uatomic_add_return */
static inline __attribute__((always_inline))
/* uatomic_add_return */
static inline __attribute__((always_inline))
-unsigned long _uatomic_add_return(void *addr, unsigned long val,
- int len)
+unsigned long _uatomic_add_return(void *addr, unsigned long val, int len)
{
switch (len) {
case 4:
{
{
switch (len) {
case 4:
{
- unsigned int old;
+ unsigned int old
, oldt
;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read(
(unsigned int *)
addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 4);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 4);
@@
-145,9
+144,9
@@
unsigned long _uatomic_add_return(void *addr, unsigned long val,
#if (BITS_PER_LONG == 64)
case 8:
{
#if (BITS_PER_LONG == 64)
case 8:
{
- unsigned long old;
+ unsigned long old
, oldt
;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read(
(unsigned long *)
addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 8);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 8);
@@
-176,7
+175,6
@@
unsigned long _uatomic_add_return(void *addr, unsigned long val,
#define uatomic_inc(addr) uatomic_add((addr), 1)
#define uatomic_dec(addr) uatomic_add((addr), -1)
#define uatomic_inc(addr) uatomic_add((addr), 1)
#define uatomic_dec(addr) uatomic_add((addr), -1)
-#define URCU_CAS_AVAIL() 1
#define compat_uatomic_cmpxchg(ptr, old, _new) uatomic_cmpxchg(ptr, old, _new)
#endif /* _URCU_ARCH_UATOMIC_PPC_H */
#define compat_uatomic_cmpxchg(ptr, old, _new) uatomic_cmpxchg(ptr, old, _new)
#endif /* _URCU_ARCH_UATOMIC_PPC_H */
This page took
0.039888 seconds
and
4
git commands to generate.