{"action":"closed","number":2789,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2789","id":33056404,"html_url":"https://github.com/RIOT-OS/RIOT/pull/2789","diff_url":"https://github.com/RIOT-OS/RIOT/pull/2789.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/2789.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2789","number":2789,"state":"closed","locked":false,"title":"AODVv2: fix mutex for route message creation","user":{"login":"Lotterleben","id":581552,"avatar_url":"https://avatars.githubusercontent.com/u/581552?v=3","gravatar_id":"","url":"https://api.github.com/users/Lotterleben","html_url":"https://github.com/Lotterleben","followers_url":"https://api.github.com/users/Lotterleben/followers","following_url":"https://api.github.com/users/Lotterleben/following{/other_user}","gists_url":"https://api.github.com/users/Lotterleben/gists{/gist_id}","starred_url":"https://api.github.com/users/Lotterleben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lotterleben/subscriptions","organizations_url":"https://api.github.com/users/Lotterleben/orgs","repos_url":"https://api.github.com/users/Lotterleben/repos","events_url":"https://api.github.com/users/Lotterleben/events{/privacy}","received_events_url":"https://api.github.com/users/Lotterleben/received_events","type":"User","site_admin":false},"body":"In order to prevent the threads (for example the main and the receiver thread) from using the writer at the same time, causing bogus data in control packets, AODVv2 currently uses the ``writer_mutex``. However, this mutex sits at the wring entry point: \r\nThe ``aodv_send_r*()`` functions are used to send AODVv2 control messages (i.e. RREQ, RREP, RERR). These functions then send the information that a control packet of type x with content y needs to be sent to the ``sender_thread`` via IPC, which then handles these IPC messages one by one and build and dispatches the RREQ/RREP/RERRs sequentially. \r\nSo the critical point is not the writer, but in fact the ``aodv_send_rreq()``, ``aodv_send_rrep()`` and ``aodv_send_rerr()`` functions. This PR removes the unnecessary mutex in the writer and adds one mutex per ``aodv_send_r*()`` function instead.","created_at":"2015-04-10T15:22:27Z","updated_at":"2015-04-13T09:08:44Z","closed_at":"2015-04-13T09:08:44Z","merged_at":"2015-04-13T09:08:44Z","merge_commit_sha":"94318630ca18ad7dd97c6a8909e77b36de7d68bb","assignee":{"login":"BytesGalore","id":3903215,"avatar_url":"https://avatars.githubusercontent.com/u/3903215?v=3","gravatar_id":"","url":"https://api.github.com/users/BytesGalore","html_url":"https://github.com/BytesGalore","followers_url":"https://api.github.com/users/BytesGalore/followers","following_url":"https://api.github.com/users/BytesGalore/following{/other_user}","gists_url":"https://api.github.com/users/BytesGalore/gists{/gist_id}","starred_url":"https://api.github.com/users/BytesGalore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BytesGalore/subscriptions","organizations_url":"https://api.github.com/users/BytesGalore/orgs","repos_url":"https://api.github.com/users/BytesGalore/repos","events_url":"https://api.github.com/users/BytesGalore/events{/privacy}","received_events_url":"https://api.github.com/users/BytesGalore/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2789/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2789/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/2789/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/436a105ff716904e39c303a57c3dcf5c71425984","head":{"label":"Lotterleben:aodvv2_mutex_fix","ref":"aodvv2_mutex_fix","sha":"436a105ff716904e39c303a57c3dcf5c71425984","user":{"login":"Lotterleben","id":581552,"avatar_url":"https://avatars.githubusercontent.com/u/581552?v=3","gravatar_id":"","url":"https://api.github.com/users/Lotterleben","html_url":"https://github.com/Lotterleben","followers_url":"https://api.github.com/users/Lotterleben/followers","following_url":"https://api.github.com/users/Lotterleben/following{/other_user}","gists_url":"https://api.github.com/users/Lotterleben/gists{/gist_id}","starred_url":"https://api.github.com/users/Lotterleben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lotterleben/subscriptions","organizations_url":"https://api.github.com/users/Lotterleben/orgs","repos_url":"https://api.github.com/users/Lotterleben/repos","events_url":"https://api.github.com/users/Lotterleben/events{/privacy}","received_events_url":"https://api.github.com/users/Lotterleben/received_events","type":"User","site_admin":false},"repo":{"id":16456544,"name":"RIOT","full_name":"Lotterleben/RIOT","owner":{"login":"Lotterleben","id":581552,"avatar_url":"https://avatars.githubusercontent.com/u/581552?v=3","gravatar_id":"","url":"https://api.github.com/users/Lotterleben","html_url":"https://github.com/Lotterleben","followers_url":"https://api.github.com/users/Lotterleben/followers","following_url":"https://api.github.com/users/Lotterleben/following{/other_user}","gists_url":"https://api.github.com/users/Lotterleben/gists{/gist_id}","starred_url":"https://api.github.com/users/Lotterleben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lotterleben/subscriptions","organizations_url":"https://api.github.com/users/Lotterleben/orgs","repos_url":"https://api.github.com/users/Lotterleben/repos","events_url":"https://api.github.com/users/Lotterleben/events{/privacy}","received_events_url":"https://api.github.com/users/Lotterleben/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Lotterleben/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/Lotterleben/RIOT","forks_url":"https://api.github.com/repos/Lotterleben/RIOT/forks","keys_url":"https://api.github.com/repos/Lotterleben/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Lotterleben/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Lotterleben/RIOT/teams","hooks_url":"https://api.github.com/repos/Lotterleben/RIOT/hooks","issue_events_url":"https://api.github.com/repos/Lotterleben/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/Lotterleben/RIOT/events","assignees_url":"https://api.github.com/repos/Lotterleben/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/Lotterleben/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/Lotterleben/RIOT/tags","blobs_url":"https://api.github.com/repos/Lotterleben/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Lotterleben/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Lotterleben/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/Lotterleben/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Lotterleben/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/Lotterleben/RIOT/languages","stargazers_url":"https://api.github.com/repos/Lotterleben/RIOT/stargazers","contributors_url":"https://api.github.com/repos/Lotterleben/RIOT/contributors","subscribers_url":"https://api.github.com/repos/Lotterleben/RIOT/subscribers","subscription_url":"https://api.github.com/repos/Lotterleben/RIOT/subscription","commits_url":"https://api.github.com/repos/Lotterleben/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/Lotterleben/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/Lotterleben/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/Lotterleben/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/Lotterleben/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/Lotterleben/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Lotterleben/RIOT/merges","archive_url":"https://api.github.com/repos/Lotterleben/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Lotterleben/RIOT/downloads","issues_url":"https://api.github.com/repos/Lotterleben/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/Lotterleben/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/Lotterleben/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/Lotterleben/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Lotterleben/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/Lotterleben/RIOT/releases{/id}","created_at":"2014-02-02T15:06:09Z","updated_at":"2014-09-04T18:08:11Z","pushed_at":"2015-04-10T15:12:52Z","git_url":"git://github.com/Lotterleben/RIOT.git","ssh_url":"git@github.com:Lotterleben/RIOT.git","clone_url":"https://github.com/Lotterleben/RIOT.git","svn_url":"https://github.com/Lotterleben/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":16366,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"580ae0a63d38f64ff2e0b022e37746f68f02dfd8","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}","created_at":"2012-12-29T20:38:40Z","updated_at":"2015-04-12T21:37:33Z","pushed_at":"2015-04-13T09:08:44Z","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":96602,"stargazers_count":327,"watchers_count":327,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"open_issues_count":309,"forks":265,"open_issues":309,"watchers":327,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2789"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/2789"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2789"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2789/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2789/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/2789/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/436a105ff716904e39c303a57c3dcf5c71425984"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"BytesGalore","id":3903215,"avatar_url":"https://avatars.githubusercontent.com/u/3903215?v=3","gravatar_id":"","url":"https://api.github.com/users/BytesGalore","html_url":"https://github.com/BytesGalore","followers_url":"https://api.github.com/users/BytesGalore/followers","following_url":"https://api.github.com/users/BytesGalore/following{/other_user}","gists_url":"https://api.github.com/users/BytesGalore/gists{/gist_id}","starred_url":"https://api.github.com/users/BytesGalore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BytesGalore/subscriptions","organizations_url":"https://api.github.com/users/BytesGalore/orgs","repos_url":"https://api.github.com/users/BytesGalore/repos","events_url":"https://api.github.com/users/BytesGalore/events{/privacy}","received_events_url":"https://api.github.com/users/BytesGalore/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":20,"deletions":11,"changed_files":2}}