Please tell me the diff. between getpid and gettid.
How pids and tids are stored behind the scenes is implementation dependent, typically through usage of the pid_t type.
pid_t
Usually they are just signed integers.