{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/74148495","id":74148495,"diff_hunk":"@@ -301,6 +304,10 @@ static int sock_cntr_wait(struct fid_cntr *cntr, uint64_t threshold,\n \t\tret = fi_wait_cond(&_cntr->cond, &_cntr->mut, timeout);\n \t}\n \n+\tif (atomic_get(&_cntr->value) >= threshold &&\n+\t    atomic_get(&_cntr->last_read_val) < threshold) {","path":"prov/sockets/src/sock_cntr.c","position":50,"original_position":29,"commit_id":"b8eb9ae649d5874cecb66cc14f126253310936fd","original_commit_id":"4a3314e955df601c405a51bdd6884c95768fdcf3","user":{"login":"bturrubiates","id":2322856,"avatar_url":"https://avatars.githubusercontent.com/u/2322856?v=3","gravatar_id":"","url":"https://api.github.com/users/bturrubiates","html_url":"https://github.com/bturrubiates","followers_url":"https://api.github.com/users/bturrubiates/followers","following_url":"https://api.github.com/users/bturrubiates/following{/other_user}","gists_url":"https://api.github.com/users/bturrubiates/gists{/gist_id}","starred_url":"https://api.github.com/users/bturrubiates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturrubiates/subscriptions","organizations_url":"https://api.github.com/users/bturrubiates/orgs","repos_url":"https://api.github.com/users/bturrubiates/repos","events_url":"https://api.github.com/users/bturrubiates/events{/privacy}","received_events_url":"https://api.github.com/users/bturrubiates/received_events","type":"User","site_admin":false},"body":"> Yeah, it is possible (eg: timeout occured, and the current value is less than threshold).\r\n\r\nOops, I think I asked the wrong question. What I meant to ask was whether `&_cntr->last_read_val` would ever be greater than or equal to `threshold`. \r\n\r\nI'm wondering whether you could just do:\r\n\r\n```c\r\nif (atomic_get(&_cntr->value) >= threshold)\r\n    atomic_set(&_cntr->last_read_val, threshold);\r\n```\r\n\r\nAlso, should this be setting `&_cntr->last_read_val` to `threshold` or `&_cntr->value`?","created_at":"2016-08-09T21:30:52Z","updated_at":"2016-08-09T21:30:52Z","html_url":"https://github.com/ofiwg/libfabric/pull/2249#discussion_r74148495","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/74148495"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/2249#discussion_r74148495"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249","id":80664646,"html_url":"https://github.com/ofiwg/libfabric/pull/2249","diff_url":"https://github.com/ofiwg/libfabric/pull/2249.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/2249.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2249","number":2249,"state":"open","locked":false,"title":"prov/sockets: Update fi_poll semantics","user":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"body":"- Update fi_poll semanctis for counters. fi_poll() returns success if\r\n  the counter value is different from the last-read-value.\r\n\r\nFixes #2240\r\n\r\nSigned-off-by: Jithin Jose <jithin.jose@intel.com>","created_at":"2016-08-09T17:50:24Z","updated_at":"2016-08-09T21:30:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cef586802db3a5bb42b9bc4bf6a2ebbc53593079","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2249/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/b8eb9ae649d5874cecb66cc14f126253310936fd","head":{"label":"jithinjosepkl:pr/sockets","ref":"pr/sockets","sha":"b8eb9ae649d5874cecb66cc14f126253310936fd","user":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"repo":{"id":25373287,"name":"libfabric","full_name":"jithinjosepkl/libfabric","owner":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jithinjosepkl/libfabric","description":"Open Fabric Interfaces","fork":true,"url":"https://api.github.com/repos/jithinjosepkl/libfabric","forks_url":"https://api.github.com/repos/jithinjosepkl/libfabric/forks","keys_url":"https://api.github.com/repos/jithinjosepkl/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jithinjosepkl/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jithinjosepkl/libfabric/teams","hooks_url":"https://api.github.com/repos/jithinjosepkl/libfabric/hooks","issue_events_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/jithinjosepkl/libfabric/events","assignees_url":"https://api.github.com/repos/jithinjosepkl/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/jithinjosepkl/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/jithinjosepkl/libfabric/tags","blobs_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jithinjosepkl/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/jithinjosepkl/libfabric/languages","stargazers_url":"https://api.github.com/repos/jithinjosepkl/libfabric/stargazers","contributors_url":"https://api.github.com/repos/jithinjosepkl/libfabric/contributors","subscribers_url":"https://api.github.com/repos/jithinjosepkl/libfabric/subscribers","subscription_url":"https://api.github.com/repos/jithinjosepkl/libfabric/subscription","commits_url":"https://api.github.com/repos/jithinjosepkl/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/jithinjosepkl/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/jithinjosepkl/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/jithinjosepkl/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jithinjosepkl/libfabric/merges","archive_url":"https://api.github.com/repos/jithinjosepkl/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jithinjosepkl/libfabric/downloads","issues_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/jithinjosepkl/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/jithinjosepkl/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/jithinjosepkl/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jithinjosepkl/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/jithinjosepkl/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/jithinjosepkl/libfabric/deployments","created_at":"2014-10-17T19:16:22Z","updated_at":"2016-01-20T00:11:46Z","pushed_at":"2016-08-09T21:13:46Z","git_url":"git://github.com/jithinjosepkl/libfabric.git","ssh_url":"git@github.com:jithinjosepkl/libfabric.git","clone_url":"https://github.com/jithinjosepkl/libfabric.git","svn_url":"https://github.com/jithinjosepkl/libfabric","homepage":null,"size":11687,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"77a16c12a879081ab02dc9f74f8e48f325613b7d","user":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"repo":{"id":22996097,"name":"libfabric","full_name":"ofiwg/libfabric","owner":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ofiwg/libfabric","description":"Open Fabric Interfaces","fork":false,"url":"https://api.github.com/repos/ofiwg/libfabric","forks_url":"https://api.github.com/repos/ofiwg/libfabric/forks","keys_url":"https://api.github.com/repos/ofiwg/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofiwg/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofiwg/libfabric/teams","hooks_url":"https://api.github.com/repos/ofiwg/libfabric/hooks","issue_events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/ofiwg/libfabric/events","assignees_url":"https://api.github.com/repos/ofiwg/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/ofiwg/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/ofiwg/libfabric/tags","blobs_url":"https://api.github.com/repos/ofiwg/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofiwg/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofiwg/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofiwg/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/ofiwg/libfabric/languages","stargazers_url":"https://api.github.com/repos/ofiwg/libfabric/stargazers","contributors_url":"https://api.github.com/repos/ofiwg/libfabric/contributors","subscribers_url":"https://api.github.com/repos/ofiwg/libfabric/subscribers","subscription_url":"https://api.github.com/repos/ofiwg/libfabric/subscription","commits_url":"https://api.github.com/repos/ofiwg/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofiwg/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofiwg/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/ofiwg/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofiwg/libfabric/merges","archive_url":"https://api.github.com/repos/ofiwg/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofiwg/libfabric/downloads","issues_url":"https://api.github.com/repos/ofiwg/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/ofiwg/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/ofiwg/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/ofiwg/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofiwg/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/ofiwg/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/ofiwg/libfabric/deployments","created_at":"2014-08-15T16:45:53Z","updated_at":"2016-07-28T19:08:40Z","pushed_at":"2016-08-09T21:13:46Z","git_url":"git://github.com/ofiwg/libfabric.git","ssh_url":"git@github.com:ofiwg/libfabric.git","clone_url":"https://github.com/ofiwg/libfabric.git","svn_url":"https://github.com/ofiwg/libfabric","homepage":"http://ofiwg.github.io/libfabric/","size":13607,"stargazers_count":73,"watchers_count":73,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":75,"mirror_url":null,"open_issues_count":82,"forks":75,"open_issues":82,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/2249"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/2249"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/2249/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2249/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/b8eb9ae649d5874cecb66cc14f126253310936fd"}}}}
{"actor":{"display_login":"bturrubiates"}}