{"action":"opened","number":5038,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5038","id":62544008,"html_url":"https://github.com/RIOT-OS/RIOT/pull/5038","diff_url":"https://github.com/RIOT-OS/RIOT/pull/5038.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/5038.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5038","number":5038,"state":"open","locked":false,"title":"gnrc_pktdump: make pid global","user":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"body":"`gnrc_pktdump` uses a getter function for the thread pid. AFAIK, our consensus was to use global variables for such use cases instead.\r\n\r\nThe size copmarison is not that interesting, but this may be due to the fact, that we have only very few occurences where the pid is actually used in our current examples/tests.\r\n\r\n```\r\ntext    data    bss     dec     BOARD/BINDIRBASE\r\n\r\n-8      0       0       -8      arduino-due\r\n57928   284     17488   75700   master-bin\r\n57920   284     17488   75692   pktdump-bin\r\n\r\n-6      0       0       -6      arduino-mega2560\r\n81374   11386   11289   104049  master-bin\r\n81368   11386   11289   104043  pktdump-bin\r\n\r\n-8      0       0       -8      avsextrem\r\n85948   220     98077   184245  master-bin\r\n85940   220     98077   184237  pktdump-bin\r\n\r\n-8      0       0       -8      cc2538dk\r\n58104   220     17440   75764   master-bin\r\n58096   220     17440   75756   pktdump-bin\r\n\r\n0       0       0       0       ek-lm4f120xl\r\n58356   220     17416   75992   master-bin\r\n58356   220     17416   75992   pktdump-bin\r\n\r\n0       0       0       0       f4vi1\r\n60056   224     17552   77832   master-bin\r\n60056   224     17552   77832   pktdump-bin\r\n\r\n-8      0       0       -8      fox\r\n72968   220     20600   93788   master-bin\r\n72960   220     20600   93780   pktdump-bin\r\n\r\n0       0       0       0       frdm-k64f\r\n58076   1248    17408   76732   master-bin\r\n58076   1248    17408   76732   pktdump-bin\r\n\r\n-8      0       0       -8      iotlab-m3\r\n72992   220     20600   93812   master-bin\r\n72984   220     20600   93804   pktdump-bin\r\n\r\n-8      0       0       -8      limifrog-v1\r\n59236   220     17536   76992   master-bin\r\n59228   220     17536   76984   pktdump-bin\r\n\r\n-8      0       0       -8      mbed_lpc1768\r\n57704   220     17408   75332   master-bin\r\n57696   220     17408   75324   pktdump-bin\r\n\r\n-8      0       0       -8      msba2\r\n107840  220     98077   206137  master-bin\r\n107832  220     98077   206129  pktdump-bin\r\n\r\n0       0       0       0       msbiot\r\n60368   224     17600   78192   master-bin\r\n60368   224     17600   78192   pktdump-bin\r\n\r\n0       0       0       0       mulle\r\n75924   1284    21064   98272   master-bin\r\n75924   1284    21064   98272   pktdump-bin\r\n\r\n-88     0       0       -88     native\r\n196478  620     103128  300226  master-bin\r\n196390  620     103128  300138  pktdump-bin\r\n\r\n0       0       0       0       nrf52dk\r\n57708   220     17408   75336   master-bin\r\n57708   220     17408   75336   pktdump-bin\r\n\r\n-8      0       0       -8      nucleo-f091\r\n59332   220     17408   76960   master-bin\r\n59324   220     17408   76952   pktdump-bin\r\n\r\n0       0       0       0       nucleo-f303\r\n58244   220     17416   75880   master-bin\r\n58244   220     17416   75880   pktdump-bin\r\n\r\n0       0       0       0       nucleo-f401\r\n60056   224     17552   77832   master-bin\r\n60056   224     17552   77832   pktdump-bin\r\n\r\n-8      0       0       -8      nucleo-l1\r\n59120   220     17528   76868   master-bin\r\n59112   220     17528   76860   pktdump-bin\r\n\r\n-8      0       0       -8      openmote-cc2538\r\n58056   220     17440   75716   master-bin\r\n58048   220     17440   75708   pktdump-bin\r\n\r\n-16     0       0       -16     pba-d-01-kw2x\r\n75160   1248    21136   97544   master-bin\r\n75144   1248    21136   97528   pktdump-bin\r\n\r\n-8      0       0       -8      pttu\r\n86156   220     98077   184453  master-bin\r\n86148   220     98077   184445  pktdump-bin\r\n\r\n-8      0       0       -8      remote\r\n58688   220     17440   76348   master-bin\r\n58680   220     17440   76340   pktdump-bin\r\n\r\n-8      0       0       -8      saml21-xpro\r\n59512   220     17528   77260   master-bin\r\n59504   220     17528   77252   pktdump-bin\r\n\r\n-8      0       0       -8      samr21-xpro\r\n75836   220     20616   96672   master-bin\r\n75828   220     20616   96664   pktdump-bin\r\n\r\n0       0       0       0       slwstk6220a\r\n57856   220     17536   75612   master-bin\r\n57856   220     17536   75612   pktdump-bin\r\n\r\n-16     0       0       -16     stm32f3discovery\r\n58260   220     17416   75896   master-bin\r\n58244   220     17416   75880   pktdump-bin\r\n\r\n0       0       0       0       stm32f4discovery\r\n60300   224     17576   78100   master-bin\r\n60300   224     17576   78100   pktdump-bin\r\n\r\n-8      0       0       -8      udoo\r\n57928   284     17488   75700   master-bin\r\n57920   284     17488   75692   pktdump-bin\r\n```","created_at":"2016-03-11T13:39:40Z","updated_at":"2016-03-11T13:39:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"authmillenon","id":675644,"avatar_url":"https://avatars.githubusercontent.com/u/675644?v=3","gravatar_id":"","url":"https://api.github.com/users/authmillenon","html_url":"https://github.com/authmillenon","followers_url":"https://api.github.com/users/authmillenon/followers","following_url":"https://api.github.com/users/authmillenon/following{/other_user}","gists_url":"https://api.github.com/users/authmillenon/gists{/gist_id}","starred_url":"https://api.github.com/users/authmillenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/authmillenon/subscriptions","organizations_url":"https://api.github.com/users/authmillenon/orgs","repos_url":"https://api.github.com/users/authmillenon/repos","events_url":"https://api.github.com/users/authmillenon/events{/privacy}","received_events_url":"https://api.github.com/users/authmillenon/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5038/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5038/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/5038/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/047fd79ae671ab86e357b1fb7efb54e3f8057ebd","head":{"label":"cgundogan:pr/pktdump/global_pid","ref":"pr/pktdump/global_pid","sha":"047fd79ae671ab86e357b1fb7efb54e3f8057ebd","user":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"repo":{"id":19483231,"name":"RIOT","full_name":"cgundogan/RIOT","owner":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgundogan/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/cgundogan/RIOT","forks_url":"https://api.github.com/repos/cgundogan/RIOT/forks","keys_url":"https://api.github.com/repos/cgundogan/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgundogan/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgundogan/RIOT/teams","hooks_url":"https://api.github.com/repos/cgundogan/RIOT/hooks","issue_events_url":"https://api.github.com/repos/cgundogan/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/cgundogan/RIOT/events","assignees_url":"https://api.github.com/repos/cgundogan/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/cgundogan/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/cgundogan/RIOT/tags","blobs_url":"https://api.github.com/repos/cgundogan/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgundogan/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgundogan/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgundogan/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgundogan/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/cgundogan/RIOT/languages","stargazers_url":"https://api.github.com/repos/cgundogan/RIOT/stargazers","contributors_url":"https://api.github.com/repos/cgundogan/RIOT/contributors","subscribers_url":"https://api.github.com/repos/cgundogan/RIOT/subscribers","subscription_url":"https://api.github.com/repos/cgundogan/RIOT/subscription","commits_url":"https://api.github.com/repos/cgundogan/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgundogan/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgundogan/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgundogan/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgundogan/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/cgundogan/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgundogan/RIOT/merges","archive_url":"https://api.github.com/repos/cgundogan/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgundogan/RIOT/downloads","issues_url":"https://api.github.com/repos/cgundogan/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/cgundogan/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/cgundogan/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/cgundogan/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgundogan/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/cgundogan/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/cgundogan/RIOT/deployments","created_at":"2014-05-06T06:16:02Z","updated_at":"2016-01-11T12:06:28Z","pushed_at":"2016-03-11T13:23:20Z","git_url":"git://github.com/cgundogan/RIOT.git","ssh_url":"git@github.com:cgundogan/RIOT.git","clone_url":"https://github.com/cgundogan/RIOT.git","svn_url":"https://github.com/cgundogan/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":25092,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"f6ee89992ac6b97dc011155886954c45685e50e7","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-03-11T13:02:35Z","pushed_at":"2016-03-11T12:52:17Z","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":85247,"stargazers_count":700,"watchers_count":700,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":515,"mirror_url":null,"open_issues_count":460,"forks":515,"open_issues":460,"watchers":700,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5038"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/5038"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5038"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5038/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5038/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/5038/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/047fd79ae671ab86e357b1fb7efb54e3f8057ebd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":14,"deletions":22,"changed_files":10}}