RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rtl-obj-cache.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj@rtems.org>
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
38#if !defined (_RTEMS_RTL_OBJ_CACHE_H_)
39#define _RTEMS_RTL_OBJ_CACHE_H_
40
41#include <fcntl.h>
42#include <stdbool.h>
43#include <stdint.h>
44#include <stdlib.h>
45
46#ifdef __cplusplus
47extern "C" {
48#endif /* __cplusplus */
49
53typedef struct rtems_rtl_obj_cache
54{
55 int fd;
56 size_t file_size;
57 off_t offset;
58 size_t size;
59 size_t level;
61 uint8_t* buffer;
63
74
81
88
106 int fd,
107 off_t offset,
108 void** buffer,
109 size_t* length);
110
123 int fd,
124 off_t offset,
125 void* buffer,
126 size_t length);
127
128#ifdef __cplusplus
129}
130#endif /* __cplusplus */
131
132#endif
void rtems_rtl_obj_cache_flush(rtems_rtl_obj_cache *cache)
Definition: rtl-obj-cache.c:63
bool rtems_rtl_obj_cache_open(rtems_rtl_obj_cache *cache, size_t size)
Definition: rtl-obj-cache.c:34
bool rtems_rtl_obj_cache_read_byval(rtems_rtl_obj_cache *cache, int fd, off_t offset, void *buffer, size_t length)
Definition: rtl-obj-cache.c:242
bool rtems_rtl_obj_cache_read(rtems_rtl_obj_cache *cache, int fd, off_t offset, void **buffer, size_t *length)
Definition: rtl-obj-cache.c:74
struct rtems_rtl_obj_cache rtems_rtl_obj_cache
void rtems_rtl_obj_cache_close(rtems_rtl_obj_cache *cache)
Definition: rtl-obj-cache.c:51
Definition: rtl-obj-cache.h:54
size_t file_size
Definition: rtl-obj-cache.h:56
uint8_t * buffer
Definition: rtl-obj-cache.h:61
int fd
Definition: rtl-obj-cache.h:55
size_t size
Definition: rtl-obj-cache.h:58
off_t offset
Definition: rtl-obj-cache.h:57
size_t level
Definition: rtl-obj-cache.h:59
unsigned size
Definition: tte.h:1