Unix to Windows Porting Dictionary for HPC

Links

Function List

pthread_self


Table of Contents

Unix
Windows
Purpose
Discussion

Unix

header file: pthread.h

pthread_t pthread_self(void);

Windows

header file: Windows.h

DWORD WINAPI GetCurrentThreadId(void);
      

Purpose

The pthread_self function is used to obtain the id of the calling thread.

Discussion

In the Windows threading model each created thread has both a HANDLE and a system-wide unique id. As a result the GetCurrentThreadId Windows function returns the same logical information as the POSIX call.

blog comments powered by Disqus