AvRtJoinThreadOrderingGroup function (avrt.h)

Joins client threads to a thread ordering group.

Syntax

AVRTAPI BOOL AvRtJoinThreadOrderingGroup(
  [out] PHANDLE Context,
  [in]  GUID    *ThreadOrderingGuid,
  [in]  BOOL    Before
);

Parameters

[out] Context

A pointer to a context handle.

[in] ThreadOrderingGuid

A pointer to the unique identifier for the thread ordering group.

[in] Before

The thread order. If this parameter is TRUE, the thread is a predecessor thread that is scheduled to run before the parent thread. If this parameter is FALSE, the thread is a successor thread that is scheduled to run after the parent thread.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The thread encloses the code to be executed during each period within a loop that is controlled by the AvRtWaitOnThreadOrderingGroup function.

A thread can create more than one thread ordering group and join more than one thread ordering group. However, a thread cannot join the same thread ordering group more than one time.

The number of threads that can join a group is limited only by available system resources.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header avrt.h
Library Avrt.lib
DLL Avrt.dll

See also

Thread Ordering Service