From 6c5ef876792d0feb95a49051facd2ac8c43bbceb Mon Sep 17 00:00:00 2001 From: James David Berry <jberry@apache.org> Date: Fri, 7 Mar 2008 17:16:29 +0000 Subject: [PATCH] Correct description of compareAndSwap git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@634750 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/PlatformUtils.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xercesc/util/PlatformUtils.hpp b/src/xercesc/util/PlatformUtils.hpp index 973727c93..1770cc7c9 100644 --- a/src/xercesc/util/PlatformUtils.hpp +++ b/src/xercesc/util/PlatformUtils.hpp @@ -612,9 +612,9 @@ public : * compareAndSwap subroutine performs an atomic operation which * compares the contents of a single word variable with a stored old * value. If the values are equal, a new value is stored in the single - * word variable and TRUE is returned; otherwise, the old value is set - * to the current value of the single word variable and FALSE is - * returned. + * word variable and the comparison value is returned; otherwise, + * no value is stored and the current contents of the stored location + * are returned. * * The compareAndSwap subroutine is useful when a word value must be * updated only if it has not been changed since it was last read. @@ -629,7 +629,7 @@ public : * against (and conditionally updated with) the value of the single word * variable. * - * @return Returns the new value assigned to the single word variable + * @return Returns the initial contents of the single word variable. */ static void* compareAndSwap ( -- GitLab