Skip to content

Commit

Permalink
Flush cache
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieMonroe committed Aug 12, 2013
1 parent cc35bef commit 94ab2dd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions flush_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
PROTECTED void
unw_flush_cache (unw_addr_space_t as, unw_word_t lo, unw_word_t hi)
{
#if !UNW_TARGET_IA64
struct unw_debug_frame_list *w = as->debug_frames;
#endif

/* clear dyn_info_list_addr cache: */
as->dyn_info_list_addr = 0;

#if !UNW_TARGET_IA64
for (; w; w = w->next)
{
if (w->index)
free (w->index);
free (w->debug_frame);
}
as->debug_frames = NULL;
#endif

/* This lets us flush caches lazily. The implementation currently
ignores the flush range arguments (lo-hi). This is OK because
unw_flush_cache() is allowed to flush more than the requested
range. */

#ifdef HAVE_FETCH_AND_ADD
fetch_and_add1 (&as->cache_generation);
#else
# warning unw_flush_cache(): need a way to atomically increment an integer.
++as->cache_generation;
#endif
}

0 comments on commit 94ab2dd

Please sign in to comment.