ChorusOS 4.0 Hot Restart Programmer's Guide

Appendix A Hot Restart Programming Environment

This appendix describes the environment used for programming and compiling applications which use the API exported by the hot restart feature. For more general information about compiling and linking ChorusOS actors, see the ChorusOS 4.0 Introduction.

A.1 Hot Restart Header Files and Directories

The hot restart programming interface is declared in the following files:

For the Persistent Memory Manager API:

install_dir/chorus-family/kernel/include/chorus/pmm/chPmm.h

For the Hot Restart Controller API:

install_dir/chorus-family/os/include/chorus/hr/hr.hinstall_dir/chorus-family/os/include/chorus/hr/hrCtrl.h

Detailed descriptions of each function call are available in the ChorusOS man page collection.

A.2 Make Environment

A restartable actor can be compiled using any of the following standard Imakefile macros

Actors using dynamic libraries (compiled with Imake macros of the type Dynamic...Target) cannot be hot restartable.

Use hints in the following table to link actors that use the API exported by the hot restart feature. Note that all ChorusOS actors are automatically linked with the libcx.a library.

API Function 

Library 

hrfexec()HR_EXIT_HDL()hrKillGroup()hrGetActorGroup()

libcx.a

pmmAllocate()pmmFree()pmmFreeAll()

pmmlib.a

The following is an example Imakefile for a restartable actor which uses the Persistent Memory Manager API:

SRCS = HR_actor.c

UserActorTarget(HR_actor_s, HR_actor.o, $(NUCLEUS_DIR)/lib/pmm/pmmlib.a)
Depend($(SRCS))