|
In order to support gettid when isolation is enabled and when it is
disabled, and satisfy its requirement that:
In a single-threaded process, the thread ID is equal to the process ID
(PID, as returned by getpid(2)).
we define the thread ID to be getpid() + <miri internal thread id>.
Since the internal thread id of the main thread is zero, this will
satisfy that requirement.
However, getpid for now was only supported when isolation was disabled.
To support getpid in isolation mode, we return a hardcoded value (1000)
and return that instead of the real PID.
|