summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/doc/cache.texi
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/bfd/doc/cache.texi')
-rw-r--r--contrib/binutils/bfd/doc/cache.texi60
1 files changed, 15 insertions, 45 deletions
diff --git a/contrib/binutils/bfd/doc/cache.texi b/contrib/binutils/bfd/doc/cache.texi
index 2bc3696..5820a2a 100644
--- a/contrib/binutils/bfd/doc/cache.texi
+++ b/contrib/binutils/bfd/doc/cache.texi
@@ -10,39 +10,8 @@ the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
handle.
-@findex BFD_CACHE_MAX_OPEN macro
-@subsubsection @code{BFD_CACHE_MAX_OPEN macro}
-@strong{Description}@*
-The maximum number of files which the cache will keep open at
-one time.
-@example
-#define BFD_CACHE_MAX_OPEN 10
-@end example
+@subsection Caching functions
-@findex bfd_last_cache
-@subsubsection @code{bfd_last_cache}
-@strong{Synopsis}
-@example
-extern bfd *bfd_last_cache;
-@end example
-@strong{Description}@*
-Zero, or a pointer to the topmost BFD on the chain. This is
-used by the @code{bfd_cache_lookup} macro in @file{libbfd.h} to
-determine when it can avoid a function call.
-
-@findex bfd_cache_lookup
-@subsubsection @code{bfd_cache_lookup}
-@strong{Description}@*
-Check to see if the required BFD is the same as the last one
-looked up. If so, then it can use the stream in the BFD with
-impunity, since it can't have changed since the last lookup;
-otherwise, it has to perform the complicated lookup function.
-@example
-#define bfd_cache_lookup(x) \
- ((x)==bfd_last_cache? \
- (FILE*) (bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
-@end example
@findex bfd_cache_init
@subsubsection @code{bfd_cache_init}
@@ -67,6 +36,20 @@ then close it too.
@code{FALSE} is returned if closing the file fails, @code{TRUE} is
returned if all is well.
+@findex bfd_cache_close_all
+@subsubsection @code{bfd_cache_close_all}
+@strong{Synopsis}
+@example
+bfd_boolean bfd_cache_close_all (void);
+@end example
+@strong{Description}@*
+Remove all BFDs from the cache. If the attached file is open,
+then close it too.
+
+@strong{Returns}@*
+@code{FALSE} is returned if closing one of the file fails, @code{TRUE} is
+returned if all is well.
+
@findex bfd_open_file
@subsubsection @code{bfd_open_file}
@strong{Synopsis}
@@ -80,16 +63,3 @@ BFD so that future accesses know the file is open. If the @code{FILE *}
returned is @code{NULL}, then it won't have been put in the
cache, so it won't have to be removed from it.
-@findex bfd_cache_lookup_worker
-@subsubsection @code{bfd_cache_lookup_worker}
-@strong{Synopsis}
-@example
-FILE *bfd_cache_lookup_worker (bfd *abfd);
-@end example
-@strong{Description}@*
-Called when the macro @code{bfd_cache_lookup} fails to find a
-quick answer. Find a file descriptor for @var{abfd}. If
-necessary, it open it. If there are already more than
-@code{BFD_CACHE_MAX_OPEN} files open, it tries to close one first, to
-avoid running out of file descriptors.
-
OpenPOWER on IntegriCloud