mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 23:47:39 +01:00
(get_script_cache): Use HAVE_ATOMIC_H instead of __linux && __KERNEL__.
(Logical change 1.294)
This commit is contained in:
parent
dca0c5af1a
commit
ee6eeb4f7d
1 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ get_script_cache (unw_addr_space_t as, intrmask_t *saved_maskp)
|
|||
if (caching == UNW_CACHE_NONE)
|
||||
return NULL;
|
||||
|
||||
#if defined(__linux) && defined(__KERNEL__)
|
||||
#ifdef HAVE_ATOMIC_H
|
||||
if (!spin_trylock_irqsave (&cache->busy, *saved_maskp))
|
||||
return NULL;
|
||||
#else
|
||||
|
@ -137,7 +137,7 @@ put_script_cache (unw_addr_space_t as, struct ia64_script_cache *cache,
|
|||
assert (as->caching_policy != UNW_CACHE_NONE);
|
||||
|
||||
Debug (16, "unmasking signals/interrupts and releasing lock\n");
|
||||
#if defined(__linux) && defined(__KERNEL__)
|
||||
#ifdef HAVE_ATOMIC_H
|
||||
spin_unlock_irqrestore (&cache->busy, *saved_maskp);
|
||||
#else
|
||||
# ifdef HAVE_ATOMIC_OPS_H
|
||||
|
|
Loading…
Reference in a new issue