TutThreadSelf return the T_THREAD of the current thread
None
T_THREAD value for the calling thread.
None
TutThreadSelf returns a T_THREAD value for the calling thread. For platforms that do not support threads, this is always equal to T_INVALID_THREAD. This value is useful primarily for comparison with other T_THREAD values as a means of establishing the identity of the calling thread.
Comparing two thread handles with the C equality operator (==
) is non-portable. 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.
TutThreadCreate, TutThreadDetach
This example checks to see if the calling thread is the arbitrarily-designated privileged thread:
static T_THREAD privileged_thread; T_BOOL check_privileged() { T_THREAD caller_thread = TutThreadSelf(); return TutThreadEqual(privileged_thread, caller_thread); }
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |