)]}'
{
  "commit": "8a85012bc47ebb3e985839d1cb7c699d325ff279",
  "tree": "e837a01bc630a71221883d4e6aea623cfe985224",
  "parents": [
    "5b845de636224ef3e065be8e1c7d2df3389aa175"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Sun Jan 08 08:55:40 2023 -0800"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue May 16 19:17:40 2023 +0000"
  },
  "message": "Remove the lock-based atomics fallback\n\nOn Windows, we can rely on Interlocked APIs. On non-Windows builds, we\ncurrently require C11 but permit C11 atomics to be missing, via\n__STDC_NO_ATOMICS__. This CL tightens this so C11 atomics are required\non non-MSVC builds.\n\nMy hope is that, now that we require C11 on non-Windows, this is a\nfairly safe requirement. We already require pthreads on any platform\nwhere this might apply, and it\u0027s hard to imagine someone has C11,\npthreads, but not C11 atomics.\n\nThis change means that, in later work, we can refactor the refcount\nlogic to instead be a \u003cstdatomic.h\u003e compatibility layer, and then an\natomics-targetting CRYPTO_refcount_t implementation. With a\n\u003cstdatomic.h\u003e compatibility layer, we can use atomics in more places,\nnotably where our uses of read locks are causing cacheline contention.\n\nThe platform restriction isn\u0027t *strictly* necessary. We could, like with\nrefcounts, emulate \u003cstdatomic.h\u003e with a single, global lock. Indeed any\nplatforms in this situation have already been living with that lock for\nrefcounts without noticing. But then later work to add \"atomics\" to read\nlocks would regress contention for those platforms. So I\u0027m starting by\nrejecting this, so if any such platform exists, we can understand their\nperformance needs before doing that.\n\nUpdate-Note: On non-Windows platforms, we now require C11 atomics\nsupport. Note we already require C11 itself. If this affects your build,\nget in touch with BoringSSL maintainers.\n\nBug: 570\nCq-Include-Trybots: luci.boringssl.try:linux_clang_rel_tsan\nChange-Id: I868fa4ba87ed73dfc9d52e80d46853ef56715a5f\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/59847\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "12d15a84eb0261d3d651d3e0d5169a409a90ad1a",
      "old_mode": 33188,
      "old_path": "crypto/CMakeLists.txt",
      "new_id": "c427b20c507493cbf2105b7e366e50794e5df24d",
      "new_mode": 33188,
      "new_path": "crypto/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "adcd444353a1a1896f4c9037790d76fffb54ab89",
      "old_mode": 33188,
      "old_path": "crypto/internal.h",
      "new_id": "5c0473596ff04c4a1f4cc34a47505367b6e7a790",
      "new_mode": 33188,
      "new_path": "crypto/internal.h"
    },
    {
      "type": "rename",
      "old_id": "7886bf8997d881f49374b6457cf93c13a83bd77e",
      "old_mode": 33188,
      "old_path": "crypto/refcount_lock.c",
      "new_id": "096b4fa934e386bb1c38142b524ea2c44fbea04f",
      "new_mode": 33188,
      "new_path": "crypto/refcount_no_threads.c",
      "score": 72
    }
  ]
}
