Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

enum KLDRSTATE

The state of a dynamic loader module.

KLDRSTATE.gif

The state diagram

Enumerator:
KLDRSTATE_INVALID  The usual invalid 0 enum.
KLDRSTATE_OPEN  The module has just been opened and linked into the load list.

Prev state: - Next state: MAPPED, PENDING_DESTROY

KLDRSTATE_MAPPED  The module segments has been mapped into the process memory.

Prev state: OPEN Next state: LOADED_PREREQUISITES, PENDING_DESTROY

KLDRSTATE_RELOADED  The module has been reloaded and needs to be fixed up again. This can occure when the loader is called recursivly.

The reason RELOADED modules must go back to the PENDING_GC state is because we want to guard against uninit order issues, and therefore doesn't unmap modules untill all pending termintation callbacks has been executed.

Prev state: PENDING_GC Next state: RELOADED_LOADED_PREREQUISITES, PENDING_GC

KLDRSTATE_LOADED_PREREQUISITES  The immediate prerequisites have been loaded.

Prev state: MAPPED Next state: FIXED_UP, PENDING_DESTROY

KLDRSTATE_RELOADED_LOADED_PREREQUISITES  The immediate prerequisites have been loaded for a reloaded module.

Prev state: RELOADED Next state: RELOADED_FIXED_UP, PENDING_GC

KLDRSTATE_FIXED_UP  Fixups has been applied.

Prev state: LOADED_PREREQUISITES Next state: PENDING_INITIALIZATION, PENDING_DESTROY

KLDRSTATE_RELOADED_FIXED_UP  Fixups has been applied.

Prev state: RELOADED_LOADED_PREREQUISITES Next state: PENDING_INITIALIZATION, PENDING_GC

KLDRSTATE_PENDING_INITIALIZATION  Pending initialization. While the module is in this state the loader is in reentrant mode.

Prev state: FIXED_UP, RELOADED_FIXED_UP Next state: INITIALIZATION, PENDING_GC

KLDRSTATE_INITIALIZING  Initializing. While the module is in this state the loader is in reentrant mode.

Prev state: PENDING_INITIALIZATION Next state: GOOD, PENDING_GC

KLDRSTATE_INITIALIZATION_FAILED  Initialization failed.

This is somewhat similar to PENDING_GC except that, a module in this state cannot be reloaded untill we've done GC. This ensures that a init failure during recursive loading is propagated up.

While the module is in this state the loader is in reentrant mode.

Prev state: INITIALIZING Next state: GC

KLDRSTATE_GOOD  The module has been successfully loaded and initialized. While the module is in this state the loader can be in reentrant or 'unused' mode.

Prev state: INITIALIZING Next state: PENDING_TERMINATION

KLDRSTATE_PENDING_TERMINATION  Pending termination, reference count is 0. While the module is in this state the loader is in reentrant mode. Prerequisite modules are dropped when a module enters this state.

Prev state: GOOD Next state: TERMINATING, GOOD

KLDRSTATE_TERMINATING  Terminating, reference count is still 0. While the module is in this state the loader is in reentrant mode.

Prev state: PENDING_TERMINATION Next state: PENDING_GC

KLDRSTATE_PENDING_GC  Pending garbage collection. Prerequisite modules are dropped when a module enters this state (if not done already).

Prev state: TERMINATING, PENDING_INITIALIZATION, INITIALIZATION_FAILED Next state: GC, RELOADED

KLDRSTATE_GC  Being garbage collected.

Prev state: PENDING_GC, INITIALIZATION_FAILED Next state: PENDING_DESTROY, DESTROYED

KLDRSTATE_PENDING_DESTROY  The module has be unlinked, but there are still stack references to it.

Prev state: GC, FIXED_UP, LOADED_PREREQUISITES, MAPPED, OPEN Next state: DESTROYED

KLDRSTATE_DESTROYED  The module has been destroyed but not freed yet.

This happens when a module ends up being destroyed when cRefs > 0. The module structure will be freed when cRefs reaches 0.

Prev state: GC, PENDING_DESTROY

KLDRSTATE_END  The end of valid states (exclusive)
KLDRSTATE_32BIT_HACK  The usual 32-bit blowup.

Definition at line 95 of file kLdrInternal.h.

{
    /** The usual invalid 0 enum. */
    KLDRSTATE_INVALID = 0,

    /** The module has just been opened and linked into the load list.
     *
     * Prev state: -
     * Next state: MAPPED, PENDING_DESTROY
     */
    KLDRSTATE_OPEN,

    /** The module segments has been mapped into the process memory.
     *
     * Prev state: OPEN
     * Next state: LOADED_PREREQUISITES, PENDING_DESTROY
     */
    KLDRSTATE_MAPPED,
    /** The module has been reloaded and needs to be fixed up again.
     * This can occure when the loader is called recursivly.
     *
     * The reason RELOADED modules must go back to the PENDING_GC state is
     * because we want to guard against uninit order issues, and therefore
     * doesn't unmap modules untill all pending termintation callbacks has
     * been executed.
     *
     * Prev state: PENDING_GC
     * Next state: RELOADED_LOADED_PREREQUISITES, PENDING_GC
     */
    KLDRSTATE_RELOADED,

    /** The immediate prerequisites have been loaded.
     *
     * Prev state: MAPPED
     * Next state: FIXED_UP, PENDING_DESTROY
     */
    KLDRSTATE_LOADED_PREREQUISITES,
    /** The immediate prerequisites have been loaded for a reloaded module.
     *
     * Prev state: RELOADED
     * Next state: RELOADED_FIXED_UP, PENDING_GC
     */
    KLDRSTATE_RELOADED_LOADED_PREREQUISITES,

    /** Fixups has been applied.
     *
     * Prev state: LOADED_PREREQUISITES
     * Next state: PENDING_INITIALIZATION, PENDING_DESTROY
     */
    KLDRSTATE_FIXED_UP,
    /** Fixups has been applied.
     *
     * Prev state: RELOADED_LOADED_PREREQUISITES
     * Next state: PENDING_INITIALIZATION, PENDING_GC
     */
    KLDRSTATE_RELOADED_FIXED_UP,

    /** Pending initialization.
     * While the module is in this state the loader is in reentrant mode.
     *
     * Prev state: FIXED_UP, RELOADED_FIXED_UP
     * Next state: INITIALIZATION, PENDING_GC
     */
    KLDRSTATE_PENDING_INITIALIZATION,

    /** Initializing.
     * While the module is in this state the loader is in reentrant mode.
     *
     * Prev state: PENDING_INITIALIZATION
     * Next state: GOOD, PENDING_GC
     */
    KLDRSTATE_INITIALIZING,

    /** Initialization failed.
     *
     * This is somewhat similar to PENDING_GC except that, a module
     * in this state cannot be reloaded untill we've done GC. This ensures
     * that a init failure during recursive loading is propagated up.
     *
     * While the module is in this state the loader is in reentrant mode.
     *
     * Prev state: INITIALIZING
     * Next state: GC
     */
    KLDRSTATE_INITIALIZATION_FAILED,

    /** The module has been successfully loaded and initialized.
     * While the module is in this state the loader can be in reentrant
     * or 'unused' mode.
     *
     * Prev state: INITIALIZING
     * Next state: PENDING_TERMINATION
     */
    KLDRSTATE_GOOD,

    /** Pending termination, reference count is 0.
     * While the module is in this state the loader is in reentrant mode.
     * Prerequisite modules are dropped when a module enters this state.
     *
     * Prev state: GOOD
     * Next state: TERMINATING, GOOD
     */
    KLDRSTATE_PENDING_TERMINATION,

    /** Terminating, reference count is still 0.
     * While the module is in this state the loader is in reentrant mode.
     *
     * Prev state: PENDING_TERMINATION
     * Next state: PENDING_GC
     */
    KLDRSTATE_TERMINATING,

    /** Pending garbage collection.
     * Prerequisite modules are dropped when a module enters this state (if not done already).
     *
     * Prev state: TERMINATING, PENDING_INITIALIZATION, INITIALIZATION_FAILED
     * Next state: GC, RELOADED
     */
    KLDRSTATE_PENDING_GC,

    /** Being garbage collected.
     *
     * Prev state: PENDING_GC, INITIALIZATION_FAILED
     * Next state: PENDING_DESTROY, DESTROYED
     */
    KLDRSTATE_GC,

    /** The module has be unlinked, but there are still stack references to it.
     *
     * Prev state: GC, FIXED_UP, LOADED_PREREQUISITES, MAPPED, OPEN
     * Next state: DESTROYED
     */
    KLDRSTATE_PENDING_DESTROY,

    /** The module has been destroyed but not freed yet.
     *
     * This happens when a module ends up being destroyed when cRefs > 0. The
     * module structure will be freed when cRefs reaches 0.
     *
     * Prev state: GC, PENDING_DESTROY
     */
    KLDRSTATE_DESTROYED,

    /** The end of valid states (exclusive) */
    KLDRSTATE_END = KLDRSTATE_DESTROYED,
    /** The usual 32-bit blowup. */
    KLDRSTATE_32BIT_HACK = 0x7fffffff
} KLDRSTATE;


Generated by  Doxygen 1.6.0   Back to index