LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

CmtReleaseTSQWritePtr

int CmtReleaseTSQWritePtr (CmtTSQHandle queueHandle, int itemsWritten);

Purpose

Releases a pointer to a thread safe queue's internal buffer that you obtained from CmtGetTSQWritePtr.

The data you write to the thread safe queue is not available for reading from another thread until you release the pointer with this function. After you call this function, the pointer is no longer valid. You cannot use an invalid pointer to write data into the thread safe queue.

Parameters

Input
Name Type Description
queueHandle CmtTSQHandle The handle you obtained from CmtNewTSQ to identify the thread safe queue.
itemsWritten int The number of items that you wrote into the thread safe queue using the write pointer you obtained from CmtGetTSQWritePtr.

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 CmtReleaseTSQWritePtr function:

  • utility\threading\ThreadSafeQueue\DirectPtrAccess\DirectPtrAccess.cws

    Open example
  • utility\threading\ThreadSafeQueue\Overflow\Overflow.cws

    Open example

Log in to get a better experience