HTL_thread_equal
Compares whether two threads are equal.
Interface Definition
int HTL_thread_equal(HTL_thread_t thread1, HTL_thread_t thread2, bool *result);
Description
HTL_thread_equal() is used to compare whether two thread handles are equal. Compares whether the handles thread1 and thread2 of two workers are the same and returns the comparison result through result.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
thread1 |
HTL_thread_t |
Address of the handle to thread1. |
Input |
thread2 |
HTL_thread_t |
Address of the handle to thread2. |
Input |
result |
bool * |
Comparison result.
|
Output |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
1 2 3 4 5 | int ret; bool is_same; HTL_thread_t thread1; HTL_thread_t thread2 ret = HTL_thread_equal(thread1, thread2, &is_same); |
Parent topic: Thread Functions