A method and apparatus is disclosed wherein a first structure in a memory of a
controller for sharing information is defined and a hidden structure containing
control information for sharing information with the first defined structure is
created. Data is synchronized between controllers so that firmware development
is simplified. The user defines a structure and through the use of macro calls
makes that structure shared. Lock rules are provided, to perform synchronization
and buffer management. Failover and failback are also addressed to provide a comprehensive
solution for sharing work and information between controllers. Accordingly, the
emulated shared memory mechanism allows a programmer to define a structure that
contains information for sharing without having to reinvent firmware when new features
are added to a storage controller.