{"action":"created","comment":{"url":"https://api.github.com/repos/google/periph/pulls/comments/232732694","pull_request_review_id":173994544,"id":232732694,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjczMjY5NA==","diff_hunk":"@@ -5,6 +5,9 @@\n package fs\n \n import \"syscall\"\n+import \"golang.org/x/sys/unix\"","path":"host/fs/fs_linux.go","position":4,"original_position":4,"commit_id":"1b7b63e485f02c7e24e6d3c17078a529bfe53c49","original_commit_id":"1b7b63e485f02c7e24e6d3c17078a529bfe53c49","user":{"login":"maruel","id":75011,"node_id":"MDQ6VXNlcjc1MDEx","avatar_url":"https://avatars2.githubusercontent.com/u/75011?v=4","gravatar_id":"","url":"https://api.github.com/users/maruel","html_url":"https://github.com/maruel","followers_url":"https://api.github.com/users/maruel/followers","following_url":"https://api.github.com/users/maruel/following{/other_user}","gists_url":"https://api.github.com/users/maruel/gists{/gist_id}","starred_url":"https://api.github.com/users/maruel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maruel/subscriptions","organizations_url":"https://api.github.com/users/maruel/orgs","repos_url":"https://api.github.com/users/maruel/repos","events_url":"https://api.github.com/users/maruel/events{/privacy}","received_events_url":"https://api.github.com/users/maruel/received_events","type":"User","site_admin":false},"body":"Please use `goimports` to update the imports automatically. It'll keep them ordered.\r\nDo not use package unix; periph doesn't have any external imports.","created_at":"2018-11-12T16:47:00Z","updated_at":"2018-11-12T16:54:59Z","html_url":"https://github.com/google/periph/pull/338#discussion_r232732694","pull_request_url":"https://api.github.com/repos/google/periph/pulls/338","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/google/periph/pulls/comments/232732694"},"html":{"href":"https://github.com/google/periph/pull/338#discussion_r232732694"},"pull_request":{"href":"https://api.github.com/repos/google/periph/pulls/338"}}},"pull_request":{"url":"https://api.github.com/repos/google/periph/pulls/338","id":230194816,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTk0ODE2","html_url":"https://github.com/google/periph/pull/338","diff_url":"https://github.com/google/periph/pull/338.diff","patch_url":"https://github.com/google/periph/pull/338.patch","issue_url":"https://api.github.com/repos/google/periph/issues/338","number":338,"state":"open","locked":false,"title":"fs,sysfs: Fix #323","user":{"login":"mame82","id":13119970,"node_id":"MDQ6VXNlcjEzMTE5OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/13119970?v=4","gravatar_id":"","url":"https://api.github.com/users/mame82","html_url":"https://github.com/mame82","followers_url":"https://api.github.com/users/mame82/followers","following_url":"https://api.github.com/users/mame82/following{/other_user}","gists_url":"https://api.github.com/users/mame82/gists{/gist_id}","starred_url":"https://api.github.com/users/mame82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mame82/subscriptions","organizations_url":"https://api.github.com/users/mame82/orgs","repos_url":"https://api.github.com/users/mame82/repos","events_url":"https://api.github.com/users/mame82/events{/privacy}","received_events_url":"https://api.github.com/users/mame82/received_events","type":"User","site_admin":false},"body":"Another possible solution to fix #323.\r\n\r\nNotes:\r\n- observations and testing have been done on a Rapsberry Pi Zero, with a 4.14.71 kernel (custom)\r\n- instead of using epoll_ctl to add an epoll event for the GPIO sysfs value file only once, the code has been modified to delete the epoll event on every call to `Halt` and recreate it on a call to `In`\r\n- before the epoll event gets deleted, it is modified to trigger on `EPOLLOUT`\r\n- this modification ultimately fires an EPOLLOUT event itself and thus unlocks a pending `epoll_wait`. Unlocking the epoll_wait by this methhod could be distinguished from other methods, as the EPOLLOUT flag is set on the resulting event\r\n- as the implementation of this library doesn't preserve EPOLL events, an event with `EPOLLOUT` flag set could be used as abort condition **only once** --> shouldn't work with concurrent calls to WaitForEdge\r\n\r\nAnother solution (based on loop interrupted by timeout) to force a pending `WaitForEdge` to return after a call to `Halt()` has been presented in the comments of issue #323.\r\n\r\nThe solution presented here has to be carefully tested. I have neither found any documentation of the observed behavior (calling EPOLL_CTL_MOD to set EPOLLOUT fires an event with the same flag set, for the same epoll fd), nor am I able to test on other hardware than Raspberry Pi0.","created_at":"2018-11-12T16:30:08Z","updated_at":"2018-11-12T16:54:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8276f13e204f9a1fccdb56789e73cf3e9f5662a7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/periph/pulls/338/commits","review_comments_url":"https://api.github.com/repos/google/periph/pulls/338/comments","review_comment_url":"https://api.github.com/repos/google/periph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/periph/issues/338/comments","statuses_url":"https://api.github.com/repos/google/periph/statuses/1b7b63e485f02c7e24e6d3c17078a529bfe53c49","head":{"label":"mame82:master","ref":"master","sha":"1b7b63e485f02c7e24e6d3c17078a529bfe53c49","user":{"login":"mame82","id":13119970,"node_id":"MDQ6VXNlcjEzMTE5OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/13119970?v=4","gravatar_id":"","url":"https://api.github.com/users/mame82","html_url":"https://github.com/mame82","followers_url":"https://api.github.com/users/mame82/followers","following_url":"https://api.github.com/users/mame82/following{/other_user}","gists_url":"https://api.github.com/users/mame82/gists{/gist_id}","starred_url":"https://api.github.com/users/mame82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mame82/subscriptions","organizations_url":"https://api.github.com/users/mame82/orgs","repos_url":"https://api.github.com/users/mame82/repos","events_url":"https://api.github.com/users/mame82/events{/privacy}","received_events_url":"https://api.github.com/users/mame82/received_events","type":"User","site_admin":false},"repo":{"id":156927597,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY5Mjc1OTc=","name":"periph","full_name":"mame82/periph","private":false,"owner":{"login":"mame82","id":13119970,"node_id":"MDQ6VXNlcjEzMTE5OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/13119970?v=4","gravatar_id":"","url":"https://api.github.com/users/mame82","html_url":"https://github.com/mame82","followers_url":"https://api.github.com/users/mame82/followers","following_url":"https://api.github.com/users/mame82/following{/other_user}","gists_url":"https://api.github.com/users/mame82/gists{/gist_id}","starred_url":"https://api.github.com/users/mame82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mame82/subscriptions","organizations_url":"https://api.github.com/users/mame82/orgs","repos_url":"https://api.github.com/users/mame82/repos","events_url":"https://api.github.com/users/mame82/events{/privacy}","received_events_url":"https://api.github.com/users/mame82/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mame82/periph","description":"Go·Hardware·Lean","fork":true,"url":"https://api.github.com/repos/mame82/periph","forks_url":"https://api.github.com/repos/mame82/periph/forks","keys_url":"https://api.github.com/repos/mame82/periph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mame82/periph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mame82/periph/teams","hooks_url":"https://api.github.com/repos/mame82/periph/hooks","issue_events_url":"https://api.github.com/repos/mame82/periph/issues/events{/number}","events_url":"https://api.github.com/repos/mame82/periph/events","assignees_url":"https://api.github.com/repos/mame82/periph/assignees{/user}","branches_url":"https://api.github.com/repos/mame82/periph/branches{/branch}","tags_url":"https://api.github.com/repos/mame82/periph/tags","blobs_url":"https://api.github.com/repos/mame82/periph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mame82/periph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mame82/periph/git/refs{/sha}","trees_url":"https://api.github.com/repos/mame82/periph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mame82/periph/statuses/{sha}","languages_url":"https://api.github.com/repos/mame82/periph/languages","stargazers_url":"https://api.github.com/repos/mame82/periph/stargazers","contributors_url":"https://api.github.com/repos/mame82/periph/contributors","subscribers_url":"https://api.github.com/repos/mame82/periph/subscribers","subscription_url":"https://api.github.com/repos/mame82/periph/subscription","commits_url":"https://api.github.com/repos/mame82/periph/commits{/sha}","git_commits_url":"https://api.github.com/repos/mame82/periph/git/commits{/sha}","comments_url":"https://api.github.com/repos/mame82/periph/comments{/number}","issue_comment_url":"https://api.github.com/repos/mame82/periph/issues/comments{/number}","contents_url":"https://api.github.com/repos/mame82/periph/contents/{+path}","compare_url":"https://api.github.com/repos/mame82/periph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mame82/periph/merges","archive_url":"https://api.github.com/repos/mame82/periph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mame82/periph/downloads","issues_url":"https://api.github.com/repos/mame82/periph/issues{/number}","pulls_url":"https://api.github.com/repos/mame82/periph/pulls{/number}","milestones_url":"https://api.github.com/repos/mame82/periph/milestones{/number}","notifications_url":"https://api.github.com/repos/mame82/periph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mame82/periph/labels{/name}","releases_url":"https://api.github.com/repos/mame82/periph/releases{/id}","deployments_url":"https://api.github.com/repos/mame82/periph/deployments","created_at":"2018-11-09T23:03:37Z","updated_at":"2018-11-12T16:16:03Z","pushed_at":"2018-11-12T16:16:01Z","git_url":"git://github.com/mame82/periph.git","ssh_url":"git@github.com:mame82/periph.git","clone_url":"https://github.com/mame82/periph.git","svn_url":"https://github.com/mame82/periph","homepage":"https://periph.io","size":2059,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"ffcf73319e56582803fec6548c1d716d39a9435a","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":70828109,"node_id":"MDEwOlJlcG9zaXRvcnk3MDgyODEwOQ==","name":"periph","full_name":"google/periph","private":false,"owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/google/periph","description":"Go·Hardware·Lean","fork":false,"url":"https://api.github.com/repos/google/periph","forks_url":"https://api.github.com/repos/google/periph/forks","keys_url":"https://api.github.com/repos/google/periph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/periph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/periph/teams","hooks_url":"https://api.github.com/repos/google/periph/hooks","issue_events_url":"https://api.github.com/repos/google/periph/issues/events{/number}","events_url":"https://api.github.com/repos/google/periph/events","assignees_url":"https://api.github.com/repos/google/periph/assignees{/user}","branches_url":"https://api.github.com/repos/google/periph/branches{/branch}","tags_url":"https://api.github.com/repos/google/periph/tags","blobs_url":"https://api.github.com/repos/google/periph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/periph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/periph/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/periph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/periph/statuses/{sha}","languages_url":"https://api.github.com/repos/google/periph/languages","stargazers_url":"https://api.github.com/repos/google/periph/stargazers","contributors_url":"https://api.github.com/repos/google/periph/contributors","subscribers_url":"https://api.github.com/repos/google/periph/subscribers","subscription_url":"https://api.github.com/repos/google/periph/subscription","commits_url":"https://api.github.com/repos/google/periph/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/periph/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/periph/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/periph/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/periph/contents/{+path}","compare_url":"https://api.github.com/repos/google/periph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/periph/merges","archive_url":"https://api.github.com/repos/google/periph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/periph/downloads","issues_url":"https://api.github.com/repos/google/periph/issues{/number}","pulls_url":"https://api.github.com/repos/google/periph/pulls{/number}","milestones_url":"https://api.github.com/repos/google/periph/milestones{/number}","notifications_url":"https://api.github.com/repos/google/periph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/periph/labels{/name}","releases_url":"https://api.github.com/repos/google/periph/releases{/id}","deployments_url":"https://api.github.com/repos/google/periph/deployments","created_at":"2016-10-13T16:53:51Z","updated_at":"2018-11-12T15:46:31Z","pushed_at":"2018-11-12T16:30:10Z","git_url":"git://github.com/google/periph.git","ssh_url":"git@github.com:google/periph.git","clone_url":"https://github.com/google/periph.git","svn_url":"https://github.com/google/periph","homepage":"https://periph.io","size":2175,"stargazers_count":1139,"watchers_count":1139,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":95,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":95,"open_issues":39,"watchers":1139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/periph/pulls/338"},"html":{"href":"https://github.com/google/periph/pull/338"},"issue":{"href":"https://api.github.com/repos/google/periph/issues/338"},"comments":{"href":"https://api.github.com/repos/google/periph/issues/338/comments"},"review_comments":{"href":"https://api.github.com/repos/google/periph/pulls/338/comments"},"review_comment":{"href":"https://api.github.com/repos/google/periph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/periph/pulls/338/commits"},"statuses":{"href":"https://api.github.com/repos/google/periph/statuses/1b7b63e485f02c7e24e6d3c17078a529bfe53c49"}},"author_association":"NONE"}}
{"actor":{"display_login":"maruel"}}