ArduinoThread
ArduinoThread copied to clipboard
Use uintptr_t type for ThreadID
For Arduino target code there is no difference between int and pointer sizes but it matters when compiling the code for unit test on a 64bit linux host computer:
.../arduino/sketchbook/libraries/ArduinoThread/Thread.cpp: In constructor ‘Thread::Thread(void (*)(), long unsigned int)’:
.../arduino/sketchbook/libraries/ArduinoThread/Thread.cpp:9:18: error: cast from ‘Thread*’ to ‘int’ loses precision [-fpermissive]
ThreadID = (int)this;
^~~~