usermode/library/mcore/src/reincarnation_callback.h File Reference

Go to the source code of this file.

Functions

void mnemosyne_reincarnation_callback_register (void(*initializer)())
void mnemosyne_reincarnation_callback_execute_all ()


Detailed Description

Specifies the interfaces by which reincarnation callbacks may be initiated from within initialization routines.

The concept here is that callback registration is initiated by

Author:
Andres Jaan Tack <tack@cs.wisc.edu>

Definition in file reincarnation_callback.h.


Function Documentation

void mnemosyne_reincarnation_callback_execute_all (  ) 

Runs all currently-registered callbacks given by clients of the mnemosyne library. These callbacks will execute under the assumption that persistent memory has been mapped for all global objects and that dynamically-allocated persistent segments have been re-mapped.

Definition at line 69 of file reincarnation_callback.c.

References list_head::next, and reincarnation_callback::routine.

void mnemosyne_reincarnation_callback_register ( void(*)()  initializer  ) 

Registers an callback function which is run upon reincarnation of a persistent address space. The client library (or application) may, at this time, be assured that any persistent globals are valid, as well as any dynamic segments which are run.

To register a callback successfully, the routine initializing the callback must run in a constructor (the gcc attribute constructor). It does not matter that this constructor run before or after mnemosyne initializes; in one case, the callback will be queued. In the other, it will be run.

Callbacks registered through this method will be executed in order.

Parameters:
initialize will be called immediately upon complete reincarnation of the persistent address space.

Definition at line 57 of file reincarnation_callback.c.

References reincarnation_callback::list, and reincarnation_callback::routine.


Generated on Sat Apr 23 11:43:36 2011 for Mnemosyne by  doxygen 1.4.7