You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef LOAD_BUFFER_H
  2. #define LOAD_BUFFER_H
  3. #include "buffer.h"
  4. /*
  5. * These functions are architecture-dependent, but the interface must
  6. * be identical between architectures.
  7. *
  8. */
  9. /*
  10. * Initialise a buffer suitable for loading an image. Pass in a
  11. * pointer to an uninitialised struct buffer.
  12. *
  13. * Note that this function may (for example) allocate all remaining
  14. * allocatable memory, so it must be called *after* any other code
  15. * that might want to allocate memory (e.g. device driver
  16. * initialisation).
  17. *
  18. */
  19. extern int init_load_buffer ( struct buffer *buffer );
  20. /*
  21. * Cut a load buffer down to size once the image has been loaded.
  22. * This will shrink the buffer down to the size of the data contained
  23. * within the buffer, freeing up unused memory if applicable.
  24. *
  25. */
  26. extern void trim_load_buffer ( struct buffer *buffer );
  27. /*
  28. * Finish using a load buffer, once the image has been moved into its
  29. * target location in memory.
  30. *
  31. */
  32. extern void done_load_buffer ( struct buffer *buffer );
  33. #endif /* LOAD_BUFFER_H */