{"action":"created","issue":{"url":"https://api.github.com/repos/mbedmicro/mbed/issues/2259","repository_url":"https://api.github.com/repos/mbedmicro/mbed","labels_url":"https://api.github.com/repos/mbedmicro/mbed/issues/2259/labels{/name}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/issues/2259/comments","events_url":"https://api.github.com/repos/mbedmicro/mbed/issues/2259/events","html_url":"https://github.com/mbedmicro/mbed/pull/2259","id":167732989,"number":2259,"title":"Fix MAIN_THREAD_ID check","user":{"login":"c1728p9","id":2916772,"avatar_url":"https://avatars.githubusercontent.com/u/2916772?v=3","gravatar_id":"","url":"https://api.github.com/users/c1728p9","html_url":"https://github.com/c1728p9","followers_url":"https://api.github.com/users/c1728p9/followers","following_url":"https://api.github.com/users/c1728p9/following{/other_user}","gists_url":"https://api.github.com/users/c1728p9/gists{/gist_id}","starred_url":"https://api.github.com/users/c1728p9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c1728p9/subscriptions","organizations_url":"https://api.github.com/users/c1728p9/orgs","repos_url":"https://api.github.com/users/c1728p9/repos","events_url":"https://api.github.com/users/c1728p9/events{/privacy}","received_events_url":"https://api.github.com/users/c1728p9/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T23:06:48Z","updated_at":"2016-07-26T23:37:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/2259","html_url":"https://github.com/mbedmicro/mbed/pull/2259","diff_url":"https://github.com/mbedmicro/mbed/pull/2259.diff","patch_url":"https://github.com/mbedmicro/mbed/pull/2259.patch"},"body":"In cmsis_os.h OS_TIMERS is undefined unless the timer thread is\r\ndisabled, in which case it is defined to 0. When comparing against\r\nan undefined value, the undefined value will evaluate as if it were\r\n0. Because of this the MAIN_THREAD_ID was always set to 0x1.\r\nThis patch fixes that problem by checking if OS_TIMERS is defined\r\nbefore comparing it to 0.\r\n\r\nThis problem only effects IAR since it has a different heap/stack\r\nlayout. GCC_ARM and ARM have a dedicated stack region so\r\nthe presence of a guard word and stack checking does not cause\r\nproblems.\r\n\r\nThis problem manifested on the NRF51_DK in the pull request\r\nhttps://github.com/mbedmicro/mbed/pull/2211\r\nas a c_strings test failure on floating point. This is because the\r\nguard word of the main stack overlapped with standard library\r\ndata used by sprintf and corrupted it."},"comment":{"url":"https://api.github.com/repos/mbedmicro/mbed/issues/comments/235438772","html_url":"https://github.com/mbedmicro/mbed/pull/2259#issuecomment-235438772","issue_url":"https://api.github.com/repos/mbedmicro/mbed/issues/2259","id":235438772,"user":{"login":"mbed-bot","id":12690234,"avatar_url":"https://avatars.githubusercontent.com/u/12690234?v=3","gravatar_id":"","url":"https://api.github.com/users/mbed-bot","html_url":"https://github.com/mbed-bot","followers_url":"https://api.github.com/users/mbed-bot/followers","following_url":"https://api.github.com/users/mbed-bot/following{/other_user}","gists_url":"https://api.github.com/users/mbed-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/mbed-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbed-bot/subscriptions","organizations_url":"https://api.github.com/users/mbed-bot/orgs","repos_url":"https://api.github.com/users/mbed-bot/repos","events_url":"https://api.github.com/users/mbed-bot/events{/privacy}","received_events_url":"https://api.github.com/users/mbed-bot/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T23:37:29Z","updated_at":"2016-07-26T23:37:29Z","body":"[Build 718]\nSUCCESS: Building succeeded and tests were run! Be sure to check the test results\n"}}
{"actor":{"display_login":"mbed-bot"}}