The standard library Run_At__Premicrothread api defines access to functionality for registering functions to be run at system startup or shutdown.
The Run_At__Premicrothread api is implemented by the src/lib/std/src/nj/run-at–premicrothread.pkg package.
The Run_At__Premicrothread api source code is in src/lib/std/src/nj/run-at–premicrothread.api.
The above information is manually maintained and may contain errors.
api { When = FORK_TO_DISK | NEVER_RUN | SHUTDOWN_PHASE_1_USER_HOOKS | SHUTDOWN_PHASE_2_UNREDIRECT_SYSCALLS | SHUTDOWN_PHASE_3_STOP_THREAD_SCHEDULER | SHUTDOWN_PHASE_4_STOP_SUPPORT_HOSTTHREADS | SHUTDOWN_PHASE_5_ZERO_COMPILE_STATISTICS | SHUTDOWN_PHASE_6_CLOSE_OPEN_FILES | SHUTDOWN_PHASE_6_FLUSH_OPEN_FILES | SHUTDOWN_PHASE_7_CLEAR_POSIX_INTERPROCESS_SIGNAL_HANDLER_TABLE | SPAWN_TO_DISK | STARTUP_PHASE_10_START_NEW_DLOPEN_ERA | STARTUP_PHASE_11_START_SUPPORT_HOSTTHREADS | STARTUP_PHASE_12_START_THREAD_SCHEDULER | STARTUP_PHASE_13_REDIRECT_SYSCALLS | STARTUP_PHASE_14_START_BASE_IMPS | STARTUP_PHASE_15_START_XKIT_IMPS | STARTUP_PHASE_16_OF_HEAP_MADE_BY_FORK_TO_DISK | STARTUP_PHASE_16_OF_HEAP_MADE_BY_SPAWN_TO_DISK | STARTUP_PHASE_17_USER_HOOKS | STARTUP_PHASE_1_RESET_STATE_VARIABLES | STARTUP_PHASE_2_REOPEN_MYTHRYL_LOG | STARTUP_PHASE_3_REOPEN_USER_LOGS | STARTUP_PHASE_4_MAKE_STDIN_STDOUT_AND_STDERR | STARTUP_PHASE_5_CLOSE_STALE_OUTPUT_STREAMS | STARTUP_PHASE_6_INITIALIZE_POSIX_INTERPROCESS_SIGNAL_HANDLER_TABLE | STARTUP_PHASE_7_RESET_POSIX_INTERPROCESS_SIGNAL_HANDLER_TABLE | STARTUP_PHASE_8_RESET_COMPILER_STATISTICS | STARTUP_PHASE_9_RESET_CPU_AND_WALLCLOCK_TIMERS; schedule : (String , List(When ) , (When -> Void)) -> Null_Or(((List(When ) , (When -> Void))) ); deschedule : String -> Null_Or(((List(When ) , (When -> Void))) ); run_functions_scheduled_to_run : When -> Void; when_to_string : When -> String; when_to_int : When -> Int; when_compare : (When , When) -> Order; when_gt : (When , When) -> Bool; get_schedule : Void -> List(((String , List(When ))) );};