Search code examples
c++processpthreadspid

What is the diff. between getpid and gettid in c++


getpid() vs gettid()

Please tell me the diff. between getpid and gettid.


Solution

  • How pids and tids are stored behind the scenes is implementation dependent, typically through usage of the pid_t type.

    Usually they are just signed integers.