Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
signal.cpp File Reference
#include "mozce_internal.h"

Go to the source code of this file.

Functions

static void defaultSighandler (int inSignal)
MOZCE_SHUNT_API int mozce_raise (int inSignal)
MOZCE_SHUNT_API _sigsig mozce_signal (int inSignal, _sigsig inFunc)

Variables

static _sigsig sigArray [_SIGCOUNT]

Function Documentation

static void defaultSighandler ( int  inSignal) [static]

Definition at line 52 of file signal.cpp.

{
    // From process.cpp
    extern void mozce_abort(void);
    mozce_abort();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 59 of file signal.cpp.

{
    MOZCE_PRECHECK

#ifdef DEBUG
    mozce_printf("mozce_raise called\n");
#endif

    void (*handler)(int inSignal) = defaultSighandler;

    if(inSignal >= 0 && inSignal < _SIGCOUNT)
    {
        if(NULL != sigArray[inSignal])
        {
            handler = sigArray[inSignal];
        }
    }

    handler(inSignal);
    return 0;
}

Here is the call graph for this function:

MOZCE_SHUNT_API _sigsig mozce_signal ( int  inSignal,
_sigsig  inFunc 
)

Definition at line 82 of file signal.cpp.

{
    MOZCE_PRECHECK

#ifdef DEBUG
    mozce_printf("mozce_signal called\n");
#endif

    void (*retval)(int inSignal) = defaultSighandler;

    if(inSignal >= 0 && inSignal < _SIGCOUNT)
    {
        if(NULL != sigArray[inSignal])
        {
            retval = sigArray[inSignal];
        }
        sigArray[inSignal] = inFunc;
    }

    return retval;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 49 of file signal.cpp.