MapleMutexDestroy - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : C Application Programming Interface : Parallel Programming : OpenMaple/C/MapleMutexDestroy

MapleMutexDestroy

create a mutex

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

MapleMutexDestroy( kv, mutex );

Parameters

kv

-

kernel handle of type MKernelVector

mutex

-

a mutex identifier (ALGEB)

Description

• 

MapleMutexDestroy releases the resources associated with a mutex.

• 

To create a mutex in external call the MapleMutexCreate function can be used.

• 

The mutex identifier accepted by MapleMutexDestroy is compatible with the functions in the Threads[Mutex] package.  Thus mutexes created by Threads[Mutex][Create] can be passed into Maple and destroyed by MapleMutexDestroy.

Examples

#include "maplec.h"

 

ALGEB M_DECL Function( MKernelVector kv, ALGEB args )

{

    ALGEB mutex, ret;

 

    mutex = MapleMutexCreate( kv, ToMapleNULL(kv) );

    ret = DoParallelWork( kv, mutex, args );

    MapleMutexDestroy( kv, mutex );

 

    return ret;

}

See Also

CustomWrapper

define_external

MapleMutexCreate

MapleMutexLock

MapleMutexUnlock

OpenMaple

OpenMaple/C/API

OpenMaple/C/Examples

OpenMaple/C/MutexDestroy

OpenMaple/C/MutexLock

OpenMaple/C/MutexUnlock

Threads[Mutex]

 


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