Go to the source code of this file.
◆ lbm_image_write_fun
typedef bool(* lbm_image_write_fun) (uint32_t data, int32_t index, bool const_heap) |
lbm_image_write_fun function ptr.
- Parameters
-
data | 32bit word to write. |
index | Position to write to. |
const_heap | True if writing to const heap (bottom of image) and false otherwise. |
◆ lbm_image_add_and_link_symbol()
Add a symbol to the image and "link" it to a C address (variable).
- Parameters
-
name | Symbol name. |
id | Symbol id. |
symlist | Ptr to rest of symbol list. |
link | ptr where to store the symbol ID on image-boot. |
- Returns
- pointer to head of symbol list.
◆ lbm_image_add_symbol()
Add a symbol to the image. Symbols added to the image are restored upon image-boot.
- Parameters
-
name | Symbol name. |
id | Symbol id. |
symlist | Ptr to rest of symbol list. |
- Returns
- pointer to head of symbol list.
◆ lbm_image_boot()
bool lbm_image_boot |
( |
void |
| ) |
|
Boot an existing image. Restores the datastructures stored in the image.
- Returns
- true on success, false otherwise.
◆ lbm_image_create()
void lbm_image_create |
( |
char * |
version_str | ) |
|
Create an image at the address and of the size given to lbm_image_init.
- Parameters
-
version_str | a zero terminated version string or NULL. |
◆ lbm_image_exists()
bool lbm_image_exists |
( |
void |
| ) |
|
An image exists the memory area given to lbm_image_init to store the image in contains the IMAGE_INITIALIZED field at the start (top) of the image area.
- Returns
- true if image exists, false otherwise.
◆ lbm_image_get_image()
uint32_t * lbm_image_get_image |
( |
void |
| ) |
|
lbm_image_get_image provides a pointer to the starting point of an image. The starting point of an image is the lowest address, even though writing to an image is done top-down.
- Returns
- pointer to image.
◆ lbm_image_get_size()
uint32_t lbm_image_get_size |
( |
void |
| ) |
|
Get the size of an image.
- Returns
- The size of the image in 32bit words
◆ lbm_image_get_version()
char * lbm_image_get_version |
( |
void |
| ) |
|
Get the version string that was stored in the image. If no version string was stored in the image, the result is NULL.
- Returns
- pointer to version string or NULL.
◆ lbm_image_get_write_index()
int32_t lbm_image_get_write_index |
( |
void |
| ) |
|
Images are written from the top towards the bottom. The write_index is the next free location of (32bit) word size in the image.
- Returns
- write index.
◆ lbm_image_has_extensions()
bool lbm_image_has_extensions |
( |
void |
| ) |
|
Does the image have a stored extension table?
- Returns
- true if image contains extension table, false otherwise.
◆ lbm_image_init()
void lbm_image_init |
( |
uint32_t * |
image_mem_addr, |
|
|
uint32_t |
image_size, |
|
|
lbm_image_write_fun |
image_write_fun |
|
) |
| |
◆ lbm_image_save_constant_heap_ix()
bool lbm_image_save_constant_heap_ix |
( |
void |
| ) |
|
Save the current constant_heap index into the image for recovery upon restart.
- Returns
- true on success otherwise false.
◆ lbm_image_save_extensions()
bool lbm_image_save_extensions |
( |
void |
| ) |
|
Save the extension table to the image.
- Returns
- true on success otherwise false.
◆ lbm_image_save_global_env()
bool lbm_image_save_global_env |
( |
void |
| ) |
|
Save the global environment to the image.
- Returns
- true on success otherwise false.