Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uintptr_t type for ThreadID #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 17, 2019

  1. Use uintptr_t type for ThreadID

    For Arduino target code there is no difference between int and pointer sizes, e.g.
    $HOME/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino4/avr/include/stdint.h
       typedef uint16_t uintptr_t;
    
    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;
                      ^~~~
    hlovdal committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    f2b6691 View commit details
    Browse the repository at this point in the history