MapleGetInterruptValue - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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