Expand Minimize

DeleteSynchronizationBarrier function

Deletes a synchronization barrier.

Syntax


BOOL  WINAPI DeleteSynchronizationBarrier(
  _Inout_  LPSYNCHRONIZATION_BARRIER lpBarrier
);

Parameters

lpBarrier [in, out]

A pointer to the synchronization barrier to delete.

Return value

The DeleteSynchronizationBarrier function always returns TRUE.

Remarks

DeleteSynchronizationBarrier releases a synchronization barrier when it is no longer needed. It is safe to call DeleteSynchronizationBarrier immediately after calling EnterSynchronizationBarrier because that function ensures that all threads in the barrier have finished using it before allowing the barrier to be released.

If a synchronization barrier will never be deleted, threads can specify the SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE flag when they enter the barrier. This flag causes the function to skip the extra work required for deletion safety, which can improve performance. All threads using the barrier must specify this flag; if any thread does not, the flag is ignored. Be careful when using SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE, because deleting a barrier while this flag is in effect may result in an invalid handle access and cause one or more threads to become permanently blocked.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

SynchAPI.h

Library

Kernel32.lib

DLL

Kernel32.dll

See also

EnterSynchronizationBarrier
InitializeSynchronizationBarrier
Synchronization Barriers

 

 

Community Additions

ADD
Show:
© 2014 Microsoft