OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [bfd/] [doc/] [cache.texi] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
@section File caching
@section File caching
The file caching mechanism is embedded within BFD and allows
The file caching mechanism is embedded within BFD and allows
the application to open as many BFDs as it wants without
the application to open as many BFDs as it wants without
regard to the underlying operating system's file descriptor
regard to the underlying operating system's file descriptor
limit (often as low as 20 open files).  The module in
limit (often as low as 20 open files).  The module in
@code{cache.c} maintains a least recently used list of
@code{cache.c} maintains a least recently used list of
@code{BFD_CACHE_MAX_OPEN} files, and exports the name
@code{BFD_CACHE_MAX_OPEN} files, and exports the name
@code{bfd_cache_lookup}, which runs around and makes sure that
@code{bfd_cache_lookup}, which runs around and makes sure that
the required BFD is open. If not, then it chooses a file to
the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
close, closes it and opens the one wanted, returning its file
handle.
handle.
 
 
@subsection Caching functions
@subsection Caching functions
 
 
 
 
@findex bfd_cache_init
@findex bfd_cache_init
@subsubsection @code{bfd_cache_init}
@subsubsection @code{bfd_cache_init}
@strong{Synopsis}
@strong{Synopsis}
@example
@example
bfd_boolean bfd_cache_init (bfd *abfd);
bfd_boolean bfd_cache_init (bfd *abfd);
@end example
@end example
@strong{Description}@*
@strong{Description}@*
Add a newly opened BFD to the cache.
Add a newly opened BFD to the cache.
 
 
@findex bfd_cache_close
@findex bfd_cache_close
@subsubsection @code{bfd_cache_close}
@subsubsection @code{bfd_cache_close}
@strong{Synopsis}
@strong{Synopsis}
@example
@example
bfd_boolean bfd_cache_close (bfd *abfd);
bfd_boolean bfd_cache_close (bfd *abfd);
@end example
@end example
@strong{Description}@*
@strong{Description}@*
Remove the BFD @var{abfd} from the cache. If the attached file is open,
Remove the BFD @var{abfd} from the cache. If the attached file is open,
then close it too.
then close it too.
 
 
@strong{Returns}@*
@strong{Returns}@*
@code{FALSE} is returned if closing the file fails, @code{TRUE} is
@code{FALSE} is returned if closing the file fails, @code{TRUE} is
returned if all is well.
returned if all is well.
 
 
@findex bfd_cache_close_all
@findex bfd_cache_close_all
@subsubsection @code{bfd_cache_close_all}
@subsubsection @code{bfd_cache_close_all}
@strong{Synopsis}
@strong{Synopsis}
@example
@example
bfd_boolean bfd_cache_close_all (void);
bfd_boolean bfd_cache_close_all (void);
@end example
@end example
@strong{Description}@*
@strong{Description}@*
Remove all BFDs from the cache. If the attached file is open,
Remove all BFDs from the cache. If the attached file is open,
then close it too.
then close it too.
 
 
@strong{Returns}@*
@strong{Returns}@*
@code{FALSE} is returned if closing one of the file fails, @code{TRUE} is
@code{FALSE} is returned if closing one of the file fails, @code{TRUE} is
returned if all is well.
returned if all is well.
 
 
@findex bfd_open_file
@findex bfd_open_file
@subsubsection @code{bfd_open_file}
@subsubsection @code{bfd_open_file}
@strong{Synopsis}
@strong{Synopsis}
@example
@example
FILE* bfd_open_file (bfd *abfd);
FILE* bfd_open_file (bfd *abfd);
@end example
@end example
@strong{Description}@*
@strong{Description}@*
Call the OS to open a file for @var{abfd}.  Return the @code{FILE *}
Call the OS to open a file for @var{abfd}.  Return the @code{FILE *}
(possibly @code{NULL}) that results from this operation.  Set up the
(possibly @code{NULL}) that results from this operation.  Set up the
BFD so that future accesses know the file is open. If the @code{FILE *}
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
returned is @code{NULL}, then it won't have been put in the
cache, so it won't have to be removed from it.
cache, so it won't have to be removed from it.
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.