Click here to show toolbars of the Web Online Help System: show toolbars |
Table: | For specifying the wait option for threads |
+ combination: | For threads |
Table: | For specifying the wait option for events |
+ combination: | For events |
MIL_ID ThreadOrEventId, | //in |
MIL_INT64 WaitOption, | //in |
MIL_INT *StatePtr | //out |
This function allows you to synchronize the execution of threads by forcing the current thread to wait for the completion of the specified thread or the change of state of the specified event.
Specifies the identifier of the MIL thread context or event with which to be synchronized. This parameter can also be set to the MIL identifier of a system.
This parameter should be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default MIL thread context identifier associated with the current Host thread. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the identifier of a user-allocated MIL event (MthrAlloc()). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the identifier of a valid system identifier (MsysAlloc()). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the identifier of a user-allocated MIL thread context (MthrAlloc()). |
Specifies the wait option.
The following wait options are available for threads.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Forces the current thread to wait for the end (the death) of the specified thread. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Forces the current thread to wait for the completion of all functions that are not asynchronous grab commands, in the specified thread's command queue. |
You can add the following value to the above-mentioned value to set the time interval after which a thread is considered to be timed out.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the time interval after which a thread is considered to be timed out. |
||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Sets the required timeout interval, in msecs. Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
The following wait options are available for events.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Allows the current thread to continue with execution while forcing its corresponding on-board thread, located on the same board as the specified event, to wait for the specified event to be in an M_SIGNALED state. |
‡ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | ||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Note that while a GPU system supports asynchronous calls, M_EVENT_SYNCHRONIZE will behave like M_EVENT_WAIT, as described above. |
‡ | d | |||||||||||||||||||||||||||||||||||||
![]() ![]() |
Forces the current thread to wait for the specified event to be in an M_SIGNALED state or for the event to be timed out. |
‡ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u |
You can add the following value to the above-mentioned values to set the time interval after which an event is considered to be timed out.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the time interval after which an event is considered to be timed out. |
||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Sets the required timeout interval, in msecs. Set this parameter to the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
Specifies the address of the variable in which to write the state of the specified thread or event.
Since the MthrWait() function also returns the requested information, you can set this parameter to M_NULL.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() |
Specifies that the specified thread has successfully completed or the state of the specified event has changed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() |
Specifies that the thread or event on which the current thread was waiting timed out. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() |
Specifies that the specified thread is set to M_EVENT_SYNCHRONIZE. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |