1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-25 12:33:42 +01:00

(unw_caching_policy_t): New type.

(unw_set_caching_policy): New function.
(unw_flush_cache): Ditto.

(Logical change 1.22)
This commit is contained in:
mostang.com!davidm 2002-11-09 07:59:02 +00:00
parent 57c6184925
commit 16f2189512

View file

@ -80,6 +80,14 @@ typedef enum
}
unw_frame_regnum_t;
typedef enum
{
UNW_CACHE_NONE, /* no caching */
UNW_CACHE_GLOBAL, /* shared global cache */
UNW_CACHE_PER_THREAD /* per-thread caching */
}
unw_caching_policy_t;
typedef int unw_regnum_t;
/* The unwind cursor starts at the youngest (most deeply nested) frame
@ -218,3 +226,17 @@ extern const char *UNW_OBJ(regname) (int regnum);
this one is re-entrant (i.e., the returned string must be a string
constant. */
#define unw_regname(r) UNW_OBJ(regname)(r)
/* Sets the caching policy. Caching can be disabled completely by
setting the policy to UNW_CACHE_NONE. With UNW_CACHE_GLOBAL, there
is a single cache that is shared across all threads. With
UNW_CACHE_PER_THREAD, each thread gets its own cache, which can
improve performance thanks to less locking and better locality. By
default, UNW_CACHE_GLOBAL is in effect. */
#define unw_set_caching_policy(p) UNW_OBJ(set_caching_policy)(p)
/* Flush all caches (global, per-thread, or any other caches that
might exist). This function must be called if any of unwind
information might have changed (e.g., because a library might have
been removed via a call to dlclose()). */
#define unw_flush_cache() UNW_OBJ(flush_cache)()