{"action":"created","comment":{"url":"https://api.github.com/repos/openthread/openthread/pulls/comments/245487160","pull_request_review_id":189607120,"id":245487160,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ4NzE2MA==","diff_hunk":"@@ -233,6 +234,7 @@ int Uart::Output(const char *aBuf, uint16_t aBufLength)\n     }\n \n     Send();\n+    OT_CLI_UART_OUTPUT_UNLOCK();","path":"src/cli/cli_uart.cpp","position":12,"original_position":12,"commit_id":"65d385a0771b9e3cef82b3c43f7d0db4113156ea","original_commit_id":"c38ed12b43128c0e7f22074eabd784935af52987","user":{"login":"abtink","id":17729664,"node_id":"MDQ6VXNlcjE3NzI5NjY0","avatar_url":"https://avatars3.githubusercontent.com/u/17729664?v=4","gravatar_id":"","url":"https://api.github.com/users/abtink","html_url":"https://github.com/abtink","followers_url":"https://api.github.com/users/abtink/followers","following_url":"https://api.github.com/users/abtink/following{/other_user}","gists_url":"https://api.github.com/users/abtink/gists{/gist_id}","starred_url":"https://api.github.com/users/abtink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtink/subscriptions","organizations_url":"https://api.github.com/users/abtink/orgs","repos_url":"https://api.github.com/users/abtink/repos","events_url":"https://api.github.com/users/abtink/events{/privacy}","received_events_url":"https://api.github.com/users/abtink/received_events","type":"User","site_admin":false},"body":"Correct. But why the lock cannot be moved into `otPlatUartSend `?\r\nWe cannot and should not use simple debug UART log on NCP mode with UART (lock or not lock). But having a lock in platform code should not harm the NCP use-case.\r\n\r\nI strongly believe/prefer that OpenThread would not be  involved in any thread/task/OS management (locking and unlocking) and have platform code manage this. In general the OT platform APIs are intended for use by OT only. Everything related to OS should be taken care by the platform APIs themselves.","created_at":"2019-01-05T20:03:58Z","updated_at":"2019-01-05T20:03:59Z","html_url":"https://github.com/openthread/openthread/pull/3380#discussion_r245487160","pull_request_url":"https://api.github.com/repos/openthread/openthread/pulls/3380","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments/245487160"},"html":{"href":"https://github.com/openthread/openthread/pull/3380#discussion_r245487160"},"pull_request":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3380"}},"in_reply_to_id":244029892},"pull_request":{"url":"https://api.github.com/repos/openthread/openthread/pulls/3380","id":238336107,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MzM2MTA3","html_url":"https://github.com/openthread/openthread/pull/3380","diff_url":"https://github.com/openthread/openthread/pull/3380.diff","patch_url":"https://github.com/openthread/openthread/pull/3380.patch","issue_url":"https://api.github.com/repos/openthread/openthread/issues/3380","number":3380,"state":"open","locked":false,"title":"[uart] add lock interface for uart","user":{"login":"gjc13","id":9391073,"node_id":"MDQ6VXNlcjkzOTEwNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9391073?v=4","gravatar_id":"","url":"https://api.github.com/users/gjc13","html_url":"https://github.com/gjc13","followers_url":"https://api.github.com/users/gjc13/followers","following_url":"https://api.github.com/users/gjc13/following{/other_user}","gists_url":"https://api.github.com/users/gjc13/gists{/gist_id}","starred_url":"https://api.github.com/users/gjc13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjc13/subscriptions","organizations_url":"https://api.github.com/users/gjc13/orgs","repos_url":"https://api.github.com/users/gjc13/repos","events_url":"https://api.github.com/users/gjc13/events{/privacy}","received_events_url":"https://api.github.com/users/gjc13/received_events","type":"User","site_admin":false},"body":"Add a lock interface to enable uart locking in multi-thread environment.","created_at":"2018-12-13T10:24:22Z","updated_at":"2019-01-05T20:03:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e990fb939293add15ad697c7bfea97ff8a71f199","assignee":null,"assignees":[],"requested_reviewers":[{"login":"KaSroka","id":9209665,"node_id":"MDQ6VXNlcjkyMDk2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/9209665?v=4","gravatar_id":"","url":"https://api.github.com/users/KaSroka","html_url":"https://github.com/KaSroka","followers_url":"https://api.github.com/users/KaSroka/followers","following_url":"https://api.github.com/users/KaSroka/following{/other_user}","gists_url":"https://api.github.com/users/KaSroka/gists{/gist_id}","starred_url":"https://api.github.com/users/KaSroka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaSroka/subscriptions","organizations_url":"https://api.github.com/users/KaSroka/orgs","repos_url":"https://api.github.com/users/KaSroka/repos","events_url":"https://api.github.com/users/KaSroka/events{/privacy}","received_events_url":"https://api.github.com/users/KaSroka/received_events","type":"User","site_admin":false},{"login":"jwhui","id":16142208,"node_id":"MDQ6VXNlcjE2MTQyMjA4","avatar_url":"https://avatars3.githubusercontent.com/u/16142208?v=4","gravatar_id":"","url":"https://api.github.com/users/jwhui","html_url":"https://github.com/jwhui","followers_url":"https://api.github.com/users/jwhui/followers","following_url":"https://api.github.com/users/jwhui/following{/other_user}","gists_url":"https://api.github.com/users/jwhui/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhui/subscriptions","organizations_url":"https://api.github.com/users/jwhui/orgs","repos_url":"https://api.github.com/users/jwhui/repos","events_url":"https://api.github.com/users/jwhui/events{/privacy}","received_events_url":"https://api.github.com/users/jwhui/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":397568980,"node_id":"MDU6TGFiZWwzOTc1Njg5ODA=","url":"https://api.github.com/repos/openthread/openthread/labels/P4","name":"P4","color":"AFDF00","default":false},{"id":355043113,"node_id":"MDU6TGFiZWwzNTUwNDMxMTM=","url":"https://api.github.com/repos/openthread/openthread/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/openthread/openthread/pulls/3380/commits","review_comments_url":"https://api.github.com/repos/openthread/openthread/pulls/3380/comments","review_comment_url":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openthread/openthread/issues/3380/comments","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/65d385a0771b9e3cef82b3c43f7d0db4113156ea","head":{"label":"gjc13:add-uart-lock","ref":"add-uart-lock","sha":"65d385a0771b9e3cef82b3c43f7d0db4113156ea","user":{"login":"gjc13","id":9391073,"node_id":"MDQ6VXNlcjkzOTEwNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9391073?v=4","gravatar_id":"","url":"https://api.github.com/users/gjc13","html_url":"https://github.com/gjc13","followers_url":"https://api.github.com/users/gjc13/followers","following_url":"https://api.github.com/users/gjc13/following{/other_user}","gists_url":"https://api.github.com/users/gjc13/gists{/gist_id}","starred_url":"https://api.github.com/users/gjc13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjc13/subscriptions","organizations_url":"https://api.github.com/users/gjc13/orgs","repos_url":"https://api.github.com/users/gjc13/repos","events_url":"https://api.github.com/users/gjc13/events{/privacy}","received_events_url":"https://api.github.com/users/gjc13/received_events","type":"User","site_admin":false},"repo":{"id":148266994,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgyNjY5OTQ=","name":"openthread","full_name":"gjc13/openthread","private":false,"owner":{"login":"gjc13","id":9391073,"node_id":"MDQ6VXNlcjkzOTEwNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9391073?v=4","gravatar_id":"","url":"https://api.github.com/users/gjc13","html_url":"https://github.com/gjc13","followers_url":"https://api.github.com/users/gjc13/followers","following_url":"https://api.github.com/users/gjc13/following{/other_user}","gists_url":"https://api.github.com/users/gjc13/gists{/gist_id}","starred_url":"https://api.github.com/users/gjc13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjc13/subscriptions","organizations_url":"https://api.github.com/users/gjc13/orgs","repos_url":"https://api.github.com/users/gjc13/repos","events_url":"https://api.github.com/users/gjc13/events{/privacy}","received_events_url":"https://api.github.com/users/gjc13/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gjc13/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":true,"url":"https://api.github.com/repos/gjc13/openthread","forks_url":"https://api.github.com/repos/gjc13/openthread/forks","keys_url":"https://api.github.com/repos/gjc13/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gjc13/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gjc13/openthread/teams","hooks_url":"https://api.github.com/repos/gjc13/openthread/hooks","issue_events_url":"https://api.github.com/repos/gjc13/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/gjc13/openthread/events","assignees_url":"https://api.github.com/repos/gjc13/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/gjc13/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/gjc13/openthread/tags","blobs_url":"https://api.github.com/repos/gjc13/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gjc13/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gjc13/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/gjc13/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gjc13/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/gjc13/openthread/languages","stargazers_url":"https://api.github.com/repos/gjc13/openthread/stargazers","contributors_url":"https://api.github.com/repos/gjc13/openthread/contributors","subscribers_url":"https://api.github.com/repos/gjc13/openthread/subscribers","subscription_url":"https://api.github.com/repos/gjc13/openthread/subscription","commits_url":"https://api.github.com/repos/gjc13/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/gjc13/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/gjc13/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/gjc13/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/gjc13/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/gjc13/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gjc13/openthread/merges","archive_url":"https://api.github.com/repos/gjc13/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gjc13/openthread/downloads","issues_url":"https://api.github.com/repos/gjc13/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/gjc13/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/gjc13/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/gjc13/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gjc13/openthread/labels{/name}","releases_url":"https://api.github.com/repos/gjc13/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/gjc13/openthread/deployments","created_at":"2018-09-11T05:50:07Z","updated_at":"2018-12-26T05:44:06Z","pushed_at":"2019-01-02T04:12:44Z","git_url":"git://github.com/gjc13/openthread.git","ssh_url":"git@github.com:gjc13/openthread.git","clone_url":"https://github.com/gjc13/openthread.git","svn_url":"https://github.com/gjc13/openthread","homepage":"","size":54800,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openthread:master","ref":"master","sha":"e0c802569ead34482c41f65fa4a39e400a5dcaa3","user":{"login":"openthread","id":16142269,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTQyMjY5","avatar_url":"https://avatars2.githubusercontent.com/u/16142269?v=4","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"repo":{"id":55808787,"node_id":"MDEwOlJlcG9zaXRvcnk1NTgwODc4Nw==","name":"openthread","full_name":"openthread/openthread","private":false,"owner":{"login":"openthread","id":16142269,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTQyMjY5","avatar_url":"https://avatars2.githubusercontent.com/u/16142269?v=4","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openthread/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":false,"url":"https://api.github.com/repos/openthread/openthread","forks_url":"https://api.github.com/repos/openthread/openthread/forks","keys_url":"https://api.github.com/repos/openthread/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openthread/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openthread/openthread/teams","hooks_url":"https://api.github.com/repos/openthread/openthread/hooks","issue_events_url":"https://api.github.com/repos/openthread/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/openthread/openthread/events","assignees_url":"https://api.github.com/repos/openthread/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/openthread/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/openthread/openthread/tags","blobs_url":"https://api.github.com/repos/openthread/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openthread/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openthread/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/openthread/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/openthread/openthread/languages","stargazers_url":"https://api.github.com/repos/openthread/openthread/stargazers","contributors_url":"https://api.github.com/repos/openthread/openthread/contributors","subscribers_url":"https://api.github.com/repos/openthread/openthread/subscribers","subscription_url":"https://api.github.com/repos/openthread/openthread/subscription","commits_url":"https://api.github.com/repos/openthread/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/openthread/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/openthread/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/openthread/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/openthread/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/openthread/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openthread/openthread/merges","archive_url":"https://api.github.com/repos/openthread/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openthread/openthread/downloads","issues_url":"https://api.github.com/repos/openthread/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/openthread/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/openthread/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/openthread/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openthread/openthread/labels{/name}","releases_url":"https://api.github.com/repos/openthread/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/openthread/openthread/deployments","created_at":"2016-04-08T20:47:41Z","updated_at":"2019-01-04T16:47:33Z","pushed_at":"2019-01-05T09:35:31Z","git_url":"git://github.com/openthread/openthread.git","ssh_url":"git@github.com:openthread/openthread.git","clone_url":"https://github.com/openthread/openthread.git","svn_url":"https://github.com/openthread/openthread","homepage":"","size":54852,"stargazers_count":1753,"watchers_count":1753,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":530,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":530,"open_issues":47,"watchers":1753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3380"},"html":{"href":"https://github.com/openthread/openthread/pull/3380"},"issue":{"href":"https://api.github.com/repos/openthread/openthread/issues/3380"},"comments":{"href":"https://api.github.com/repos/openthread/openthread/issues/3380/comments"},"review_comments":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3380/comments"},"review_comment":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3380/commits"},"statuses":{"href":"https://api.github.com/repos/openthread/openthread/statuses/65d385a0771b9e3cef82b3c43f7d0db4113156ea"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"abtink"}}