TutThreadEqual


Name

TutThreadEqual — compare two thread handles for equality

Synopsis

T_BOOL TutThreadEqual(thread_1, thread_2) 
T_THREAD thread_1; 
T_THREAD thread_2; 

Arguments

thread_1 — first thread handle to compare

thread_2 — second thread handle to compare

Return Values

TRUE if the handles are equal, FALSE otherwise.

Diagnostics

None

Description

TutThreadEqual compares two T_THREAD values for equality. This function is necessary because some platforms use non-scalar values, such as structures, as thread handles.

Caution

Comparing two thread handles with C’s equality operator (==) is non-portable.

See Also

TutThreadCreate

Examples

This example checks for a successful return value from TutThreadCreate:

T_THREAD thread; 
 
thread = TutThreadCreate(my_thread_func, NULL, NULL); 
if (TutThreadEqual(T_INVALID_THREAD, thread)) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com