[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1104209 - /subversion/trunk/subversion/libsvn_subr/utf.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Tue, 17 May 2011 15:01:17 +0200

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.

-- 
Ivan Zhakov
Received on 2011-05-17 15:02:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.