LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

CmtReleaseLock

CmtReleaseLock

int CmtReleaseLock (CmtThreadLockHandle lockHandle);

Purpose

Releases the thread lock.

You must call this function from the same thread that called CmtGetLock or CmtGetLockEx. You must call this function once for each time that you called CmtGetLock or CmtGetLockEx.

Parameters

Input
Name Type Description
lockHandle CmtThreadLockHandle The handle you obtained from CmtNewLock to identify the thread lock.

Return Value

Name Type Description
cmtStatus int The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later

Examples

Refer to the following examples that use the CmtReleaseLock function:

  • utility\threading\ThreadedGuessers\ThreadedGuessers.cws

    Open example
  • utility\threading\ThreadLockTimeout\ThreadLockTimeout.cws

    Open example
  • utility\threading\ThreadPool\ParallelTestInit\ParallelTestInit.cws

    Open example
Was this information helpful?

Help us improve your future ni.com experience.

What are you trying to do?

Submit