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] :int)
reinterpret a :cstr as its raw int64 pointer (internal).
image-hooks/file-table
(image-hooks/file-table [op :int arg :int aux :int] :int)
backing store for tracked files (internal).
image-hooks/track-file!
(image-hooks/track-file! [path :cstr mode :cstr] :int)
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 :int)
the reload hook: reopen all tracked files.
Since: Phase AI (AI5.4)
image-hooks/slot-handle
(image-hooks/slot-handle [id :int] :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 :int)
number of tracked file slots.
image-hooks/use-reopen-tracked!
(image-hooks/use-reopen-tracked! :int)
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 :int)
the finalize hook: flush stdout and stderr.
Since: Phase AI (AI5.4)
image-hooks/use-flush-stdio!
(image-hooks/use-flush-stdio! :int)
install the stdout/stderr flush finalize hook.
Since: Phase AI (AI5.4)