tur/image_hooks
standard resource-reacquisition hooks for image dumps.
Since: Phase AI (application-image-dumps-plan, AI5.4)
image-hooks/cstr->raw
(image-hooks/cstr->raw [s : cstr] :)
reinterpret a :cstr as its raw int64 pointer (internal).
image-hooks/file-table
(image-hooks/file-table [op : int arg : int aux : int] :)
backing store for tracked files (internal).
image-hooks/track-file!
(image-hooks/track-file! [path : cstr mode : cstr] :)
register a file path to reopen on warm start.
| path | the file path to reopen | |
| mode | the fopen mode (e.g. "r", "a", "rb"); empty defaults to "r" |
The 0-based slot id, or -1 if the table is full.
Since: Phase AI (AI5.4)
image-hooks/reopen-tracked-files
(image-hooks/reopen-tracked-files :)
the reload hook: reopen all tracked files.
Since: Phase AI (AI5.4)
image-hooks/slot-handle
(image-hooks/slot-handle [id : int] :)
the current FILE* for a tracked slot.
| id | the slot id returned by image-hooks/track-file! |
The cached FILE* as an int handle (cast to FILE* in your inline-C), or 0 if the slot has not been reopened yet.
Since: Phase AI (AI5.4)
image-hooks/tracked-count
(image-hooks/tracked-count :)
number of tracked file slots.
image-hooks/use-reopen-tracked!
(image-hooks/use-reopen-tracked! :)
install the tracked-file reopen reload hook.
The number of reload hooks registered so far (from image.tur).
Since: Phase AI (AI5.4)
image-hooks/flush-stdio
(image-hooks/flush-stdio :)
the finalize hook: flush stdout and stderr.
Since: Phase AI (AI5.4)
image-hooks/use-flush-stdio!
(image-hooks/use-flush-stdio! :)
install the stdout/stderr flush finalize hook.
Since: Phase AI (AI5.4)