3.5 Reentrance

To support multiple adapter cards compatible with a HAM's type, a HAM may be declared reentrant in the definition (.DEF) file. Doing so allows the HAM to maintain multiple instances of itself; however, only one code image is maintained in the file server's memory. Each subsequent LOAD command for this same HAM calls HAM_Load, creating a new instance of itself. For each instance, the HAM receives a pointer to the command line so that it can establish a unique I/O configuration for that instance. The HAM must maintain an internal counter to track its instance number; and, when the time comes for the HAM to be unloaded, it must deactivate each bus instance managed by the HAM by calling HAI_Deactivate_Bus and free all allocated resources.