On Mon, Sep 21, 2009 at 1:52 PM, Paul Pluzhnikov <[email protected]>wrote:
>
> -# ifdef HAVE_ATOMIC_OPS_H
> +#elif defined(HAVE_ATOMIC_OPS_H) && !defined(CONFIG_CACHE_WAIT)
> if (AO_test_and_set (&cache->busy) == AO_TS_SET)
> return NULL;
> -# else
> +#else
> if (likely (caching == UNW_CACHE_GLOBAL))
> {
> Debug (16, "%s: acquiring lock\n", __FUNCTION__);
> lock_acquire (&cache->lock, *saved_maskp);
> }
> -# endif
> #endif
>
The wait vs sleep behavior of the cache currently depends
on HAVE_ATOMIC_OPS, which is more of an implementation detail and therefore
shouldn't affect the behavior of the API. I don't mind having
CONFIG_CACHE_WAIT=1 unconditionally (without a config option).
If you're a libunwind user and would like the "return NULL" behavior when
there is contention on the cache, please speak up.
-Arun
_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel