summaryrefslogtreecommitdiff
path: root/bfd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/cache.c')
-rw-r--r--bfd/cache.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index 94a82daff00..7a20b8f4f45 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -126,10 +126,19 @@ insert (bfd *abfd)
bfd_last_cache = abfd;
}
-/* Remove a BFD from the cache. */
+/*
+INTERNAL_FUNCTION
+ bfd_cache_snip
-static void
-snip (bfd *abfd)
+SYNOPSIS
+ void bfd_cache_snip (bfd *abfd);
+
+DESCRIPTION
+ Remove a BFD from the cache.
+*/
+
+void
+bfd_cache_snip (bfd *abfd)
{
abfd->lru_prev->lru_next = abfd->lru_next;
abfd->lru_next->lru_prev = abfd->lru_prev;
@@ -156,7 +165,7 @@ bfd_cache_delete (bfd *abfd)
bfd_set_error (bfd_error_system_call);
}
- snip (abfd);
+ bfd_cache_snip (abfd);
abfd->iostream = NULL;
--open_files;
@@ -231,7 +240,7 @@ bfd_cache_lookup_worker (bfd *abfd, enum cache_flag flag)
/* Move the file to the start of the cache. */
if (abfd != bfd_last_cache)
{
- snip (abfd);
+ bfd_cache_snip (abfd);
insert (abfd);
}
return (FILE *) abfd->iostream;