Added Thread::CurrentThreadId() method to wrap up thread id functionality in a more platform appropriate way.

This commit is contained in:
Robert Osfield
2020-01-06 18:39:51 +00:00
parent 8551f25da0
commit d1ff16614c
11 changed files with 59 additions and 30 deletions

View File

@@ -49,8 +49,7 @@ private:
setRunning(false);
isCanceled = false;
tid = 0;
uniqueId = nextId;
nextId++;
uniqueId = 0;
threadPriority = Thread::THREAD_PRIORITY_DEFAULT;
threadPolicy = Thread::THREAD_SCHEDULE_DEFAULT;
};
@@ -78,12 +77,10 @@ private:
pthread_t tid;
volatile int uniqueId;
size_t uniqueId;
Affinity affinity;
static int nextId;
static pthread_key_t s_tls_key;
};