MapleGetInterruptValue - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Calling External Routines : OpenMaple/C/MapleGetInterruptValue

MapleGetInterruptValue

return a Boolean value indicating whether an interrupt request has been received

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

MapleGetInterruptValue(kv)

Parameters

kv

-

kernel handle of type MKernelVector

Description

• 

This function returns a value of TRUE if an interrupt request has been received, and FALSE otherwise.

• 

The MapleGetInterruptValue function allows code to perform any clean up necessary before calling MapleCheckInterrupt.

Examples

#include "maplec.h"

ALGEB M_DECL DoABunchOfWork( MKernelVector kv, ALGEB *args )

{

    int i;

    int *data = (int*)malloc( 1000 );

    for ( i = 0; i < 100000; i++ )

    {

        /* has an interrupt occurred? */

        if ( MapleGetInterruptValue( kv ) )

        {

            /* if so, clean up data then handle the interrupt */

            free( data );

            MapleCheckInterrupt( kv );

        }

        DoABitOfWork( kv, args, data );

    }

    free( data );

    return ToMapleNULL( kv );

}

See Also

CustomWrapper

define_external

eval

OpenMaple

OpenMaple/C/API

OpenMaple/C/Examples

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam