{"action":"created","comment":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments/66467248","id":66467248,"diff_hunk":"@@ -27,34 +27,33 @@\n #define EXCLUSIVE_ACCESS (!defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS))\n \n static volatile uint32_t interrupt_enable_counter = 0;\n-static volatile uint32_t critical_interrupts_disabled = 0;\n+static volatile bool critical_interrupts_disabled = false;\n \n-static inline uint32_t get_interrupts_disabled(void)\n+bool are_interrupts_enabled(void)\n {\n #if defined(__CORTEX_A9)\n-    uint32_t interrupts_disabled = (__get_CPSR() & 0x80) >> 7;\n+    return (((__get_CPSR() & 0x80) >> 7) == 0);","path":"hal/common/critical.c","position":12,"original_position":12,"commit_id":"32f11813e6f0c0364c7403d9cd49aa3a649a2c9c","original_commit_id":"32f11813e6f0c0364c7403d9cd49aa3a649a2c9c","user":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"body":"Shift is still redundant ;-P","created_at":"2016-06-09T15:48:22Z","updated_at":"2016-06-09T15:48:22Z","html_url":"https://github.com/mbedmicro/mbed/pull/1883#discussion_r66467248","pull_request_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883","_links":{"self":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments/66467248"},"html":{"href":"https://github.com/mbedmicro/mbed/pull/1883#discussion_r66467248"},"pull_request":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883"}}},"pull_request":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883","id":73090311,"html_url":"https://github.com/mbedmicro/mbed/pull/1883","diff_url":"https://github.com/mbedmicro/mbed/pull/1883.diff","patch_url":"https://github.com/mbedmicro/mbed/pull/1883.patch","issue_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1883","number":1883,"state":"open","locked":false,"title":"Update function get_interrupts_disabled() to return a bool value rather","user":{"login":"adbridge","id":11191917,"avatar_url":"https://avatars.githubusercontent.com/u/11191917?v=3","gravatar_id":"","url":"https://api.github.com/users/adbridge","html_url":"https://github.com/adbridge","followers_url":"https://api.github.com/users/adbridge/followers","following_url":"https://api.github.com/users/adbridge/following{/other_user}","gists_url":"https://api.github.com/users/adbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/adbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adbridge/subscriptions","organizations_url":"https://api.github.com/users/adbridge/orgs","repos_url":"https://api.github.com/users/adbridge/repos","events_url":"https://api.github.com/users/adbridge/events{/privacy}","received_events_url":"https://api.github.com/users/adbridge/received_events","type":"User","site_admin":false},"body":"than an integer. This removes the need for all users to mask the returned\r\nvalue with 0x1 to determine interrupt status.\r\nExpose this function externally to allow other users to check interrupt\r\nstatus in a manner which will work for both cortex-A and cortex-M .\r\nUsage:\r\nbool disabled = get_interrupts_disabled();","created_at":"2016-06-08T17:47:13Z","updated_at":"2016-06-09T15:48:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0150cca2556ce3f973705385756025f73044795d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883/commits","review_comments_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883/comments","review_comment_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1883/comments","statuses_url":"https://api.github.com/repos/mbedmicro/mbed/statuses/32f11813e6f0c0364c7403d9cd49aa3a649a2c9c","head":{"label":"adbridge:master","ref":"master","sha":"32f11813e6f0c0364c7403d9cd49aa3a649a2c9c","user":{"login":"adbridge","id":11191917,"avatar_url":"https://avatars.githubusercontent.com/u/11191917?v=3","gravatar_id":"","url":"https://api.github.com/users/adbridge","html_url":"https://github.com/adbridge","followers_url":"https://api.github.com/users/adbridge/followers","following_url":"https://api.github.com/users/adbridge/following{/other_user}","gists_url":"https://api.github.com/users/adbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/adbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adbridge/subscriptions","organizations_url":"https://api.github.com/users/adbridge/orgs","repos_url":"https://api.github.com/users/adbridge/repos","events_url":"https://api.github.com/users/adbridge/events{/privacy}","received_events_url":"https://api.github.com/users/adbridge/received_events","type":"User","site_admin":false},"repo":{"id":60691682,"name":"mbed","full_name":"adbridge/mbed","owner":{"login":"adbridge","id":11191917,"avatar_url":"https://avatars.githubusercontent.com/u/11191917?v=3","gravatar_id":"","url":"https://api.github.com/users/adbridge","html_url":"https://github.com/adbridge","followers_url":"https://api.github.com/users/adbridge/followers","following_url":"https://api.github.com/users/adbridge/following{/other_user}","gists_url":"https://api.github.com/users/adbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/adbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adbridge/subscriptions","organizations_url":"https://api.github.com/users/adbridge/orgs","repos_url":"https://api.github.com/users/adbridge/repos","events_url":"https://api.github.com/users/adbridge/events{/privacy}","received_events_url":"https://api.github.com/users/adbridge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adbridge/mbed","description":"mbed libraries and tools (Classic). For mbed OS, look here: https://www.mbed.com/en/development/software/mbed-os/","fork":true,"url":"https://api.github.com/repos/adbridge/mbed","forks_url":"https://api.github.com/repos/adbridge/mbed/forks","keys_url":"https://api.github.com/repos/adbridge/mbed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adbridge/mbed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adbridge/mbed/teams","hooks_url":"https://api.github.com/repos/adbridge/mbed/hooks","issue_events_url":"https://api.github.com/repos/adbridge/mbed/issues/events{/number}","events_url":"https://api.github.com/repos/adbridge/mbed/events","assignees_url":"https://api.github.com/repos/adbridge/mbed/assignees{/user}","branches_url":"https://api.github.com/repos/adbridge/mbed/branches{/branch}","tags_url":"https://api.github.com/repos/adbridge/mbed/tags","blobs_url":"https://api.github.com/repos/adbridge/mbed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adbridge/mbed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adbridge/mbed/git/refs{/sha}","trees_url":"https://api.github.com/repos/adbridge/mbed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adbridge/mbed/statuses/{sha}","languages_url":"https://api.github.com/repos/adbridge/mbed/languages","stargazers_url":"https://api.github.com/repos/adbridge/mbed/stargazers","contributors_url":"https://api.github.com/repos/adbridge/mbed/contributors","subscribers_url":"https://api.github.com/repos/adbridge/mbed/subscribers","subscription_url":"https://api.github.com/repos/adbridge/mbed/subscription","commits_url":"https://api.github.com/repos/adbridge/mbed/commits{/sha}","git_commits_url":"https://api.github.com/repos/adbridge/mbed/git/commits{/sha}","comments_url":"https://api.github.com/repos/adbridge/mbed/comments{/number}","issue_comment_url":"https://api.github.com/repos/adbridge/mbed/issues/comments{/number}","contents_url":"https://api.github.com/repos/adbridge/mbed/contents/{+path}","compare_url":"https://api.github.com/repos/adbridge/mbed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adbridge/mbed/merges","archive_url":"https://api.github.com/repos/adbridge/mbed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adbridge/mbed/downloads","issues_url":"https://api.github.com/repos/adbridge/mbed/issues{/number}","pulls_url":"https://api.github.com/repos/adbridge/mbed/pulls{/number}","milestones_url":"https://api.github.com/repos/adbridge/mbed/milestones{/number}","notifications_url":"https://api.github.com/repos/adbridge/mbed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adbridge/mbed/labels{/name}","releases_url":"https://api.github.com/repos/adbridge/mbed/releases{/id}","deployments_url":"https://api.github.com/repos/adbridge/mbed/deployments","created_at":"2016-06-08T11:03:57Z","updated_at":"2016-06-08T11:04:55Z","pushed_at":"2016-06-09T15:43:41Z","git_url":"git://github.com/adbridge/mbed.git","ssh_url":"git@github.com:adbridge/mbed.git","clone_url":"https://github.com/adbridge/mbed.git","svn_url":"https://github.com/adbridge/mbed","homepage":"","size":40632,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mbedmicro:master","ref":"master","sha":"d7a196e89e14144bb749ebc9227f0704f4712323","user":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"name":"mbed","full_name":"mbedmicro/mbed","owner":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mbedmicro/mbed","description":"mbed libraries and tools (Classic). For mbed OS, look here: https://www.mbed.com/en/development/software/mbed-os/","fork":false,"url":"https://api.github.com/repos/mbedmicro/mbed","forks_url":"https://api.github.com/repos/mbedmicro/mbed/forks","keys_url":"https://api.github.com/repos/mbedmicro/mbed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbedmicro/mbed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbedmicro/mbed/teams","hooks_url":"https://api.github.com/repos/mbedmicro/mbed/hooks","issue_events_url":"https://api.github.com/repos/mbedmicro/mbed/issues/events{/number}","events_url":"https://api.github.com/repos/mbedmicro/mbed/events","assignees_url":"https://api.github.com/repos/mbedmicro/mbed/assignees{/user}","branches_url":"https://api.github.com/repos/mbedmicro/mbed/branches{/branch}","tags_url":"https://api.github.com/repos/mbedmicro/mbed/tags","blobs_url":"https://api.github.com/repos/mbedmicro/mbed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbedmicro/mbed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbedmicro/mbed/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbedmicro/mbed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbedmicro/mbed/statuses/{sha}","languages_url":"https://api.github.com/repos/mbedmicro/mbed/languages","stargazers_url":"https://api.github.com/repos/mbedmicro/mbed/stargazers","contributors_url":"https://api.github.com/repos/mbedmicro/mbed/contributors","subscribers_url":"https://api.github.com/repos/mbedmicro/mbed/subscribers","subscription_url":"https://api.github.com/repos/mbedmicro/mbed/subscription","commits_url":"https://api.github.com/repos/mbedmicro/mbed/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbedmicro/mbed/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbedmicro/mbed/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbedmicro/mbed/contents/{+path}","compare_url":"https://api.github.com/repos/mbedmicro/mbed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbedmicro/mbed/merges","archive_url":"https://api.github.com/repos/mbedmicro/mbed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbedmicro/mbed/downloads","issues_url":"https://api.github.com/repos/mbedmicro/mbed/issues{/number}","pulls_url":"https://api.github.com/repos/mbedmicro/mbed/pulls{/number}","milestones_url":"https://api.github.com/repos/mbedmicro/mbed/milestones{/number}","notifications_url":"https://api.github.com/repos/mbedmicro/mbed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbedmicro/mbed/labels{/name}","releases_url":"https://api.github.com/repos/mbedmicro/mbed/releases{/id}","deployments_url":"https://api.github.com/repos/mbedmicro/mbed/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2016-06-08T15:20:06Z","pushed_at":"2016-06-09T15:43:42Z","git_url":"git://github.com/mbedmicro/mbed.git","ssh_url":"git@github.com:mbedmicro/mbed.git","clone_url":"https://github.com/mbedmicro/mbed.git","svn_url":"https://github.com/mbedmicro/mbed","homepage":"","size":50036,"stargazers_count":666,"watchers_count":666,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":669,"mirror_url":null,"open_issues_count":214,"forks":669,"open_issues":214,"watchers":666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883"},"html":{"href":"https://github.com/mbedmicro/mbed/pull/1883"},"issue":{"href":"https://api.github.com/repos/mbedmicro/mbed/issues/1883"},"comments":{"href":"https://api.github.com/repos/mbedmicro/mbed/issues/1883/comments"},"review_comments":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883/comments"},"review_comment":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1883/commits"},"statuses":{"href":"https://api.github.com/repos/mbedmicro/mbed/statuses/32f11813e6f0c0364c7403d9cd49aa3a649a2c9c"}}}}
{"actor":{"display_login":"niklas-arm"}}