Get the unique ID number for the current thread
int Ns_GetThreadId(void);
This routine tries to come up with a unique integer corresponding to the current thread. (This is the integer that shows up in the log files.) Often, this unique ID is the PID, but not always.