On 17.05.2011 15:01, Ivan Zhakov wrote:
> On Tue, May 17, 2011 at 14:54,<stefan2_at_apache.org> wrote:
>> Author: stefan2
>> Date: Tue May 17 12:54:57 2011
>> New Revision: 1104209
>>
>> URL: http://svn.apache.org/viewvc?rev=1104209&view=rev
>> Log:
>> Fix breakage with pre-1.3 APRs, introduced in r1104160.
>> Introduce a utility function that checks for APR version as well as threading
>> settings and provides the suitable implementation for atomic pointer swaps.
>>
>> * subversion/libsvn_subr/utf.c
>> (atomic_swap): new utility function
>> (get_xlate_handle_node, put_xlate_handle_node): call our utility instead
>> of the APR 1.3+ function
>>
>> Modified:
>> subversion/trunk/subversion/libsvn_subr/utf.c
>>
>> Modified: subversion/trunk/subversion/libsvn_subr/utf.c
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1104209&r1=1104208&r2=1104209&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_subr/utf.c (original)
>> +++ subversion/trunk/subversion/libsvn_subr/utf.c Tue May 17 12:54:57 2011
>> @@ -40,6 +40,7 @@
>> #include "win32_xlate.h"
>>
>> #include "private/svn_utf_private.h"
>> +#include "private/svn_dep_compat.h"
>>
>>
>>
>> @@ -174,6 +175,30 @@ get_xlate_key(const char *topage,
>> "-xlate-handle", (char *)NULL);
>> }
>>
>> +/* Atomically replace the content in *MEM with NEW_VALUE and return
>> + * the previous content of *MEM. If atomicy cannot be guaranteed,
>> + * *MEM will not be modified and NEW_VALUE is simply returned to
>> + * the caller.
>> + */
>> +static void*
>> +atomic_swap(volatile void **mem, void *new_value)
> It would be nice to mark this function as inline, since it's optimization.
>
Done in r1104277.
-- Stefan^2.
Received on 2011-05-17 16:27:15 CEST