Author: imp
Date: Fri Dec 14 19:14:51 2018
New Revision: 342094
URL: https://svnweb.freebsd.org/changeset/base/342094

Log:
  atomic_fcmpset* return int, not the type of *.
  
  fcmpset returns true/false as a int, so make the return types and
  variables match the int to be consistent with other arch.
  
  Reviewed by: cognet@
  Differential Revision: https://reviews.freebsd.org/D18557

Modified:
  head/sys/mips/include/atomic.h

Modified: head/sys/mips/include/atomic.h
==============================================================================
--- head/sys/mips/include/atomic.h      Fri Dec 14 18:50:32 2018        
(r342093)
+++ head/sys/mips/include/atomic.h      Fri Dec 14 19:14:51 2018        
(r342094)
@@ -392,10 +392,10 @@ atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t 
        return (atomic_cmpset_32(p, cmpval, newval));
 }
 
-static __inline uint32_t
+static __inline int
 atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval)
 {
-       uint32_t ret;
+       int ret;
 
        __asm __volatile (
                "1:\n\t"
@@ -415,7 +415,7 @@ atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cm
        return ret;
 }
 
-static __inline uint32_t
+static __inline int
 atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t 
newval)
 {
        int retval;
@@ -425,7 +425,7 @@ atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t
        return (retval);
 }
 
-static __inline uint32_t
+static __inline int
 atomic_fcmpset_rel_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t 
newval)
 {
        mips_sync();
@@ -502,10 +502,10 @@ atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t 
        return (atomic_cmpset_64(p, cmpval, newval));
 }
 
-static __inline uint32_t
+static __inline int
 atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval)
 {
-        uint32_t ret;
+        int ret;
 
         __asm __volatile (
                 "1:\n\t"
@@ -526,7 +526,7 @@ atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cm
        return ret;
 }
 
-static __inline uint64_t
+static __inline int
 atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t 
newval)
 {
        int retval;
@@ -536,7 +536,7 @@ atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t
        return (retval);
 }
 
-static __inline uint64_t
+static __inline int
 atomic_fcmpset_rel_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t 
newval)
 {
        mips_sync();
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to