{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/65098941","id":65098941,"diff_hunk":"@@ -214,10 +214,19 @@ int msg_send_receive(msg_t *m, msg_t *reply, kernel_pid_t target_pid)\n     unsigned state = irq_disable();\n     thread_t *me = (thread_t*) sched_threads[sched_active_pid];\n     sched_set_status(me, STATUS_REPLY_BLOCKED);\n-    me->wait_data = (void*) reply;\n+    uint8_t target_status = ((thread_t*) sched_threads[target_pid])->status;\n \n+    if (target_status == STATUS_RECEIVE_BLOCKED) {","path":"core/msg.c","position":7,"original_position":7,"commit_id":"c4fa6f61f62fce2c963bc1a65ffbb26b9f52122a","original_commit_id":"c4fa6f61f62fce2c963bc1a65ffbb26b9f52122a","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"body":"I think this check might be actually harmful. Since the response is copied later anyway from `me->wait_data`, it should be safe to always keep the assignment in the line below.","created_at":"2016-05-30T18:41:15Z","updated_at":"2016-05-30T18:41:15Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/5444#discussion_r65098941","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/65098941"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/5444#discussion_r65098941"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444","id":70268846,"html_url":"https://github.com/RIOT-OS/RIOT/pull/5444","diff_url":"https://github.com/RIOT-OS/RIOT/pull/5444.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/5444.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5444","number":5444,"state":"open","locked":false,"title":"core: msg_send_receive if receiver is not ready","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"body":"If the receiving thread is not waiting, the sending thread will copy its `wait_data` into the reply.\r\n\r\nFixes #5443.","created_at":"2016-05-16T21:58:30Z","updated_at":"2016-05-30T18:41:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12272954033ec841c1cf9d33dadec2aedb6ed0d1","assignee":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/14","html_url":"https://github.com/RIOT-OS/RIOT/milestones/Release%202016.07","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/14/labels","id":1657251,"number":14,"title":"Release 2016.07","description":"","creator":{"login":"miri64","id":675644,"avatar_url":"https://avatars.githubusercontent.com/u/675644?v=3","gravatar_id":"","url":"https://api.github.com/users/miri64","html_url":"https://github.com/miri64","followers_url":"https://api.github.com/users/miri64/followers","following_url":"https://api.github.com/users/miri64/following{/other_user}","gists_url":"https://api.github.com/users/miri64/gists{/gist_id}","starred_url":"https://api.github.com/users/miri64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miri64/subscriptions","organizations_url":"https://api.github.com/users/miri64/orgs","repos_url":"https://api.github.com/users/miri64/repos","events_url":"https://api.github.com/users/miri64/events{/privacy}","received_events_url":"https://api.github.com/users/miri64/received_events","type":"User","site_admin":false},"open_issues":243,"closed_issues":53,"state":"open","created_at":"2016-03-21T13:28:08Z","updated_at":"2016-05-30T16:59:31Z","due_on":"2016-07-14T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5444/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/c4fa6f61f62fce2c963bc1a65ffbb26b9f52122a","head":{"label":"OlegHahm:msg_send_receive_fix","ref":"msg_send_receive_fix","sha":"c4fa6f61f62fce2c963bc1a65ffbb26b9f52122a","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"repo":{"id":10973192,"name":"RIOT","full_name":"OlegHahm/RIOT","owner":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OlegHahm/RIOT","description":"RIOT OS -  The rambling OS for the IoT","fork":true,"url":"https://api.github.com/repos/OlegHahm/RIOT","forks_url":"https://api.github.com/repos/OlegHahm/RIOT/forks","keys_url":"https://api.github.com/repos/OlegHahm/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OlegHahm/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OlegHahm/RIOT/teams","hooks_url":"https://api.github.com/repos/OlegHahm/RIOT/hooks","issue_events_url":"https://api.github.com/repos/OlegHahm/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/OlegHahm/RIOT/events","assignees_url":"https://api.github.com/repos/OlegHahm/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/OlegHahm/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/OlegHahm/RIOT/tags","blobs_url":"https://api.github.com/repos/OlegHahm/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OlegHahm/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OlegHahm/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/OlegHahm/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OlegHahm/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/OlegHahm/RIOT/languages","stargazers_url":"https://api.github.com/repos/OlegHahm/RIOT/stargazers","contributors_url":"https://api.github.com/repos/OlegHahm/RIOT/contributors","subscribers_url":"https://api.github.com/repos/OlegHahm/RIOT/subscribers","subscription_url":"https://api.github.com/repos/OlegHahm/RIOT/subscription","commits_url":"https://api.github.com/repos/OlegHahm/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/OlegHahm/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/OlegHahm/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/OlegHahm/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/OlegHahm/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/OlegHahm/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OlegHahm/RIOT/merges","archive_url":"https://api.github.com/repos/OlegHahm/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OlegHahm/RIOT/downloads","issues_url":"https://api.github.com/repos/OlegHahm/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/OlegHahm/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/OlegHahm/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/OlegHahm/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OlegHahm/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/OlegHahm/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/OlegHahm/RIOT/deployments","created_at":"2013-06-26T16:32:09Z","updated_at":"2015-11-19T16:05:05Z","pushed_at":"2016-05-30T16:16:54Z","git_url":"git://github.com/OlegHahm/RIOT.git","ssh_url":"git@github.com:OlegHahm/RIOT.git","clone_url":"https://github.com/OlegHahm/RIOT.git","svn_url":"https://github.com/OlegHahm/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":30832,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"b986ac33e81f89acf07a6ca814b7cd7cdffb109a","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/RIOT-OS/RIOT/deployments","created_at":"2012-12-29T20:38:40Z","updated_at":"2016-05-30T08:38:35Z","pushed_at":"2016-05-30T16:59:32Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":92841,"stargazers_count":779,"watchers_count":779,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":548,"mirror_url":null,"open_issues_count":484,"forks":548,"open_issues":484,"watchers":779,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/5444"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5444"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5444/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5444/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/c4fa6f61f62fce2c963bc1a65ffbb26b9f52122a"}}}}
{"actor":{"display_login":"OlegHahm"}}