Author: cognet
Date: Fri Mar 23 17:25:19 2018
New Revision: 331441
URL: https://svnweb.freebsd.org/changeset/base/331441

Log:
  In __sync_bool_compare_and_swap(), return true if the returned value is the
  same as the expected one, not the desired one.
  
  Pointy hat to:        cognet
  MFC after:    3 days

Modified:
  head/sys/mips/mips/stdatomic.c

Modified: head/sys/mips/mips/stdatomic.c
==============================================================================
--- head/sys/mips/mips/stdatomic.c      Fri Mar 23 17:22:28 2018        
(r331440)
+++ head/sys/mips/mips/stdatomic.c      Fri Mar 23 17:25:19 2018        
(r331441)
@@ -327,7 +327,7 @@ __sync_bool_compare_and_swap_4(uint32_t *mem, uint32_t
 {
 
        return (do_compare_and_swap_4(mem, expected, desired) ==
-           desired);
+           expected);
 }
 
 #define        EMIT_FETCH_AND_OP_4(name, op)                                   
\
_______________________________________________
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