Added GetThreadAffinity function to the CThread class.

This commit is contained in:
Maschell 2018-04-04 15:39:27 +02:00
parent a8305b55b4
commit fb5331881b
2 changed files with 10 additions and 2 deletions

View File

@ -28,8 +28,9 @@ AsyncDeleter::~AsyncDeleter() {
} }
void AsyncDeleter::triggerDeleteProcess(void) { void AsyncDeleter::triggerDeleteProcess(void) {
if(!deleterInstance) if(!deleterInstance){
deleterInstance = new AsyncDeleter; return;
}
//! to trigger the event after GUI process is finished execution //! to trigger the event after GUI process is finished execution
//! this function is used to swap elements from one to next array //! this function is used to swap elements from one to next array

View File

@ -91,6 +91,13 @@ public:
virtual bool isThreadRunning(void) const { virtual bool isThreadRunning(void) const {
return !isThreadSuspended() && !isThreadRunning(); return !isThreadSuspended() && !isThreadRunning();
} }
//! Gets the thread affinity.
virtual u16 getThreadAffinity(void) const {
if(pThread) return OSGetThreadAffinity(pThread);
return 0;
}
//! Shutdown thread //! Shutdown thread
virtual void shutdownThread(void) { virtual void shutdownThread(void) {
//! wait for thread to finish //! wait for thread to finish