{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2391","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2391/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2391/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2391/events","html_url":"https://github.com/ARMmbed/mbed-os/pull/2391","id":169994503,"number":2391,"title":"[rtos] Fix irq-safe rtx calls when inside critical sections","user":{"login":"geky","id":1075160,"avatar_url":"https://avatars.githubusercontent.com/u/1075160?v=3","gravatar_id":"","url":"https://api.github.com/users/geky","html_url":"https://github.com/geky","followers_url":"https://api.github.com/users/geky/followers","following_url":"https://api.github.com/users/geky/following{/other_user}","gists_url":"https://api.github.com/users/geky/gists{/gist_id}","starred_url":"https://api.github.com/users/geky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geky/subscriptions","organizations_url":"https://api.github.com/users/geky/orgs","repos_url":"https://api.github.com/users/geky/repos","events_url":"https://api.github.com/users/geky/events{/privacy}","received_events_url":"https://api.github.com/users/geky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-08T18:40:53Z","updated_at":"2016-08-12T07:11:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2391","html_url":"https://github.com/ARMmbed/mbed-os/pull/2391","diff_url":"https://github.com/ARMmbed/mbed-os/pull/2391.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/2391.patch"},"body":"Before, rtx calls would hard fault in critical sections when an svc instruction was attempted with interrupts disabled.\r\n\r\nCode exhibiting the issue:\r\n``` cpp\r\nSemaphore sema;\r\n\r\nvoid called_from_irq_or_thread() {\r\n    core_util_critical_section_enter();\r\n    stateful_stuff();\r\n    sema.release();\r\n    more_stateful_stuff();\r\n    core_util_critical_section_exit();\r\n}\r\n```\r\n\r\nRequired changes:\r\n- Added check for CPSR I bit in Cortex-A rtx\r\n- Added check for PRIMASK in Cortex-M rtx\r\n- Modified critical sections in Cortex-M rtx to be recursive\r\n  (already recursive in Cortex-A)\r\n\r\ncc @c1728p9, @0xc0170 "},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/239376987","html_url":"https://github.com/ARMmbed/mbed-os/pull/2391#issuecomment-239376987","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2391","id":239376987,"user":{"login":"0xc0170","id":2963726,"avatar_url":"https://avatars.githubusercontent.com/u/2963726?v=3","gravatar_id":"","url":"https://api.github.com/users/0xc0170","html_url":"https://github.com/0xc0170","followers_url":"https://api.github.com/users/0xc0170/followers","following_url":"https://api.github.com/users/0xc0170/following{/other_user}","gists_url":"https://api.github.com/users/0xc0170/gists{/gist_id}","starred_url":"https://api.github.com/users/0xc0170/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xc0170/subscriptions","organizations_url":"https://api.github.com/users/0xc0170/orgs","repos_url":"https://api.github.com/users/0xc0170/repos","events_url":"https://api.github.com/users/0xc0170/events{/privacy}","received_events_url":"https://api.github.com/users/0xc0170/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T07:11:53Z","updated_at":"2016-08-12T07:11:53Z","body":"@RobertRostohar @ReinhardKeil Any concerns for this changeset ? Shall this be also sent upstream to the RTX kernel?"}}
{"actor":{"display_login":"0xc0170"}}