{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/comments/218719564","pull_request_review_id":156715028,"id":218719564,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODcxOTU2NA==","diff_hunk":"@@ -0,0 +1,276 @@\n+/*\n+ * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\").\n+ * You may not use this file except in compliance with the License.\n+ * A copy of the License is located at\n+ *\n+ *  http://aws.amazon.com/apache2.0\n+ *\n+ * or in the \"license\" file accompanying this file. This file is distributed\n+ * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+ * express or implied. See the License for the specific language governing\n+ * permissions and limitations under the License.\n+ */\n+\n+/* These are implicitly included, but help with editor highlighting */\n+#include <aws/common/atomics.h>\n+#include <aws/common/common.h>\n+\n+#include <stdint.h>\n+#include <stdlib.h>\n+\n+struct aws_atomic_var {\n+    union {\n+        size_t intval;\n+        void *ptrval;\n+    } u;\n+};\n+\n+#define AWS_ATOMIC_INIT_INT_IMPL(x)                                                                                    \\\n+    {                                                                                                                  \\\n+        .u = {.intval = (x) }                                                                                          \\\n+    }\n+#define AWS_ATOMIC_INIT_PTR_IMPL(x)                                                                                    \\\n+    {                                                                                                                  \\\n+        .u = {.ptrval = (void *)(x) }                                                                                  \\\n+    }\n+\n+static inline void aws_atomic_private_compiler_barrier() {\n+    __asm__ __volatile__(\"\" : : : \"memory\");\n+}\n+\n+static inline void aws_atomic_private_barrier_before(enum aws_memory_order order) {\n+    if (order == aws_memory_order_release || order == aws_memory_order_acq_rel || order == aws_memory_order_seq_cst) {\n+        __sync_synchronize();","path":"include/aws/common/atomics_gnu_old.inl","position":45,"original_position":45,"commit_id":"730853036af4562b9b6564a89e2274530ec8575f","original_commit_id":"730853036af4562b9b6564a89e2274530ec8575f","user":{"login":"tautschnig","id":1144736,"node_id":"MDQ6VXNlcjExNDQ3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/1144736?v=4","gravatar_id":"","url":"https://api.github.com/users/tautschnig","html_url":"https://github.com/tautschnig","followers_url":"https://api.github.com/users/tautschnig/followers","following_url":"https://api.github.com/users/tautschnig/following{/other_user}","gists_url":"https://api.github.com/users/tautschnig/gists{/gist_id}","starred_url":"https://api.github.com/users/tautschnig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautschnig/subscriptions","organizations_url":"https://api.github.com/users/tautschnig/orgs","repos_url":"https://api.github.com/users/tautschnig/repos","events_url":"https://api.github.com/users/tautschnig/events{/privacy}","received_events_url":"https://api.github.com/users/tautschnig/received_events","type":"User","site_admin":false},"body":"Be careful: this is broken prior to GCC 4.4 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793)","created_at":"2018-09-19T08:51:16Z","updated_at":"2018-09-19T08:58:48Z","html_url":"https://github.com/awslabs/aws-c-common/pull/144#discussion_r218719564","pull_request_url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/comments/218719564"},"html":{"href":"https://github.com/awslabs/aws-c-common/pull/144#discussion_r218719564"},"pull_request":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144","id":216383481,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MzgzNDgx","html_url":"https://github.com/awslabs/aws-c-common/pull/144","diff_url":"https://github.com/awslabs/aws-c-common/pull/144.diff","patch_url":"https://github.com/awslabs/aws-c-common/pull/144.patch","issue_url":"https://api.github.com/repos/awslabs/aws-c-common/issues/144","number":144,"state":"open","locked":false,"title":"Add atomics support for GCC versions prior to 4.7","user":{"login":"bdonlan","id":9473,"node_id":"MDQ6VXNlcjk0NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/9473?v=4","gravatar_id":"","url":"https://api.github.com/users/bdonlan","html_url":"https://github.com/bdonlan","followers_url":"https://api.github.com/users/bdonlan/followers","following_url":"https://api.github.com/users/bdonlan/following{/other_user}","gists_url":"https://api.github.com/users/bdonlan/gists{/gist_id}","starred_url":"https://api.github.com/users/bdonlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdonlan/subscriptions","organizations_url":"https://api.github.com/users/bdonlan/orgs","repos_url":"https://api.github.com/users/bdonlan/repos","events_url":"https://api.github.com/users/bdonlan/events{/privacy}","received_events_url":"https://api.github.com/users/bdonlan/received_events","type":"User","site_admin":false},"body":"Note: This code is not currently tested by the codebuild suites we have configured, as all configured codebuild profiles a newer version of GCC (or clang).\r\n\r\n*Issue #, if available:*\r\n\r\n*Description of changes:*\r\n\r\n\r\nBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.\r\n","created_at":"2018-09-18T17:20:31Z","updated_at":"2018-09-19T08:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37d9f29fb36c30db4dd7c845d00efab31e047dfc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"graebm","id":24399397,"node_id":"MDQ6VXNlcjI0Mzk5Mzk3","avatar_url":"https://avatars3.githubusercontent.com/u/24399397?v=4","gravatar_id":"","url":"https://api.github.com/users/graebm","html_url":"https://github.com/graebm","followers_url":"https://api.github.com/users/graebm/followers","following_url":"https://api.github.com/users/graebm/following{/other_user}","gists_url":"https://api.github.com/users/graebm/gists{/gist_id}","starred_url":"https://api.github.com/users/graebm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graebm/subscriptions","organizations_url":"https://api.github.com/users/graebm/orgs","repos_url":"https://api.github.com/users/graebm/repos","events_url":"https://api.github.com/users/graebm/events{/privacy}","received_events_url":"https://api.github.com/users/graebm/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144/commits","review_comments_url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144/comments","review_comment_url":"https://api.github.com/repos/awslabs/aws-c-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/aws-c-common/issues/144/comments","statuses_url":"https://api.github.com/repos/awslabs/aws-c-common/statuses/730853036af4562b9b6564a89e2274530ec8575f","head":{"label":"bdonlan:atomics","ref":"atomics","sha":"730853036af4562b9b6564a89e2274530ec8575f","user":{"login":"bdonlan","id":9473,"node_id":"MDQ6VXNlcjk0NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/9473?v=4","gravatar_id":"","url":"https://api.github.com/users/bdonlan","html_url":"https://github.com/bdonlan","followers_url":"https://api.github.com/users/bdonlan/followers","following_url":"https://api.github.com/users/bdonlan/following{/other_user}","gists_url":"https://api.github.com/users/bdonlan/gists{/gist_id}","starred_url":"https://api.github.com/users/bdonlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdonlan/subscriptions","organizations_url":"https://api.github.com/users/bdonlan/orgs","repos_url":"https://api.github.com/users/bdonlan/repos","events_url":"https://api.github.com/users/bdonlan/events{/privacy}","received_events_url":"https://api.github.com/users/bdonlan/received_events","type":"User","site_admin":false},"repo":{"id":121189574,"node_id":"MDEwOlJlcG9zaXRvcnkxMjExODk1NzQ=","name":"aws-c-common","full_name":"bdonlan/aws-c-common","private":false,"owner":{"login":"bdonlan","id":9473,"node_id":"MDQ6VXNlcjk0NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/9473?v=4","gravatar_id":"","url":"https://api.github.com/users/bdonlan","html_url":"https://github.com/bdonlan","followers_url":"https://api.github.com/users/bdonlan/followers","following_url":"https://api.github.com/users/bdonlan/following{/other_user}","gists_url":"https://api.github.com/users/bdonlan/gists{/gist_id}","starred_url":"https://api.github.com/users/bdonlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdonlan/subscriptions","organizations_url":"https://api.github.com/users/bdonlan/orgs","repos_url":"https://api.github.com/users/bdonlan/repos","events_url":"https://api.github.com/users/bdonlan/events{/privacy}","received_events_url":"https://api.github.com/users/bdonlan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bdonlan/aws-c-common","description":"Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.","fork":true,"url":"https://api.github.com/repos/bdonlan/aws-c-common","forks_url":"https://api.github.com/repos/bdonlan/aws-c-common/forks","keys_url":"https://api.github.com/repos/bdonlan/aws-c-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bdonlan/aws-c-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bdonlan/aws-c-common/teams","hooks_url":"https://api.github.com/repos/bdonlan/aws-c-common/hooks","issue_events_url":"https://api.github.com/repos/bdonlan/aws-c-common/issues/events{/number}","events_url":"https://api.github.com/repos/bdonlan/aws-c-common/events","assignees_url":"https://api.github.com/repos/bdonlan/aws-c-common/assignees{/user}","branches_url":"https://api.github.com/repos/bdonlan/aws-c-common/branches{/branch}","tags_url":"https://api.github.com/repos/bdonlan/aws-c-common/tags","blobs_url":"https://api.github.com/repos/bdonlan/aws-c-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bdonlan/aws-c-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bdonlan/aws-c-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/bdonlan/aws-c-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bdonlan/aws-c-common/statuses/{sha}","languages_url":"https://api.github.com/repos/bdonlan/aws-c-common/languages","stargazers_url":"https://api.github.com/repos/bdonlan/aws-c-common/stargazers","contributors_url":"https://api.github.com/repos/bdonlan/aws-c-common/contributors","subscribers_url":"https://api.github.com/repos/bdonlan/aws-c-common/subscribers","subscription_url":"https://api.github.com/repos/bdonlan/aws-c-common/subscription","commits_url":"https://api.github.com/repos/bdonlan/aws-c-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/bdonlan/aws-c-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/bdonlan/aws-c-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/bdonlan/aws-c-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/bdonlan/aws-c-common/contents/{+path}","compare_url":"https://api.github.com/repos/bdonlan/aws-c-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bdonlan/aws-c-common/merges","archive_url":"https://api.github.com/repos/bdonlan/aws-c-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bdonlan/aws-c-common/downloads","issues_url":"https://api.github.com/repos/bdonlan/aws-c-common/issues{/number}","pulls_url":"https://api.github.com/repos/bdonlan/aws-c-common/pulls{/number}","milestones_url":"https://api.github.com/repos/bdonlan/aws-c-common/milestones{/number}","notifications_url":"https://api.github.com/repos/bdonlan/aws-c-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bdonlan/aws-c-common/labels{/name}","releases_url":"https://api.github.com/repos/bdonlan/aws-c-common/releases{/id}","deployments_url":"https://api.github.com/repos/bdonlan/aws-c-common/deployments","created_at":"2018-02-12T02:17:36Z","updated_at":"2018-03-16T10:02:51Z","pushed_at":"2018-09-18T17:19:27Z","git_url":"git://github.com/bdonlan/aws-c-common.git","ssh_url":"git@github.com:bdonlan/aws-c-common.git","clone_url":"https://github.com/bdonlan/aws-c-common.git","svn_url":"https://github.com/bdonlan/aws-c-common","homepage":null,"size":651,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"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":1,"default_branch":"master"}},"base":{"label":"awslabs:master","ref":"master","sha":"3367d5d13173664bc5018f5405adfa4d395c87ce","user":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":117142517,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNDI1MTc=","name":"aws-c-common","full_name":"awslabs/aws-c-common","private":false,"owner":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/awslabs/aws-c-common","description":"Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.","fork":false,"url":"https://api.github.com/repos/awslabs/aws-c-common","forks_url":"https://api.github.com/repos/awslabs/aws-c-common/forks","keys_url":"https://api.github.com/repos/awslabs/aws-c-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-c-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-c-common/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-c-common/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-c-common/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-c-common/events","assignees_url":"https://api.github.com/repos/awslabs/aws-c-common/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-c-common/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-c-common/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-c-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-c-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-c-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-c-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-c-common/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-c-common/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-c-common/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-c-common/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-c-common/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-c-common/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-c-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-c-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-c-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-c-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-c-common/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-c-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-c-common/merges","archive_url":"https://api.github.com/repos/awslabs/aws-c-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-c-common/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-c-common/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-c-common/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-c-common/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-c-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-c-common/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-c-common/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/aws-c-common/deployments","created_at":"2018-01-11T19:17:12Z","updated_at":"2018-09-14T19:39:45Z","pushed_at":"2018-09-19T00:03:36Z","git_url":"git://github.com/awslabs/aws-c-common.git","ssh_url":"git@github.com:awslabs/aws-c-common.git","clone_url":"https://github.com/awslabs/aws-c-common.git","svn_url":"https://github.com/awslabs/aws-c-common","homepage":null,"size":727,"stargazers_count":30,"watchers_count":30,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":11,"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":14,"open_issues":11,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144"},"html":{"href":"https://github.com/awslabs/aws-c-common/pull/144"},"issue":{"href":"https://api.github.com/repos/awslabs/aws-c-common/issues/144"},"comments":{"href":"https://api.github.com/repos/awslabs/aws-c-common/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/aws-c-common/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/aws-c-common/statuses/730853036af4562b9b6564a89e2274530ec8575f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tautschnig"}}