Unix to Windows Porting Dictionary for HPC |
|
|
RSS
LinksFunction List
|
Table of Contents header file: Windows.h
DWORD WINAPI GetCurrentThreadId(void);
DWORD WINAPI GetThreadId(
__in HANDLE Thread
);
The pthread_equal function is used to compare the thread IDs of two threads. It will return a non-zero value if the two are equal and a zero value if they are not. In the Windows threading model a thread has a HANDLE which is the normal method by which the object is manipulated. In addition to its handle each thread in the system has a system-wide unique id which can be accessed with the GetThreadId and GetCurrentThreadID functions. While there is no direct single call to match the POSIX pthread_equal function, a simple numeric compare after making the two get thread id calls would achieve the same result. |
|
|
|