Patch Detail
Show a patch.
GET /api/1.1/patches/14413/?format=api
{ "id": 14413, "url": "https://patchwork.libcamera.org/api/1.1/patches/14413/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14413/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211029041424.1430886-7-hiroh@chromium.org>", "date": "2021-10-29T04:14:24", "name": "[libcamera-devel,RFC,6/6] android: camera_request: Add thread safety annotation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5f26e2f77bb1bdb1cf7023670c63e6250c78939a", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14413/mbox/", "series": [ { "id": 2678, "url": "https://patchwork.libcamera.org/api/1.1/series/2678/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2678", "date": "2021-10-29T04:14:18", "name": "Introduce clang thread safety annotations", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2678/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14413/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14413/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A513CC324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 29 Oct 2021 04:14:45 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 58152600C3;\n\tFri, 29 Oct 2021 06:14:45 +0200 (CEST)", "from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com\n\t[IPv6:2607:f8b0:4864:20::102d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A7945600BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Oct 2021 06:14:42 +0200 (CEST)", "by mail-pj1-x102d.google.com with SMTP id gn3so6343595pjb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 21:14:42 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:fd56:8786:5663:b946])\n\tby smtp.gmail.com with ESMTPSA id\n\t11sm4826714pfl.41.2021.10.28.21.14.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 28 Oct 2021 21:14:40 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"EunkjQ+k\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=6v2IZFgdAKxfsaRmSEdNBR037Vi1LIHxKaYs8A+IT00=;\n\tb=EunkjQ+kq/NXaAJgTQsw1vvXRUu9MjoZGVQC8hBEai7sUnw22NkWHmbGzWU6lVg+WL\n\t7fSTZmALItosugJ+4bgCVsf+pT7pmy/lmoWQkz995nw3QVKjnulaT0xzwhzBqH9oRCme\n\ta6V/ympoTCD30gx9Uaf+6cEXx5YDm6VAhfnUc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=6v2IZFgdAKxfsaRmSEdNBR037Vi1LIHxKaYs8A+IT00=;\n\tb=wm1HM8DjdFvfl+luKfsBlOLQw4UOcH2O+84cFABSzpL5alXnAEQXrjcbo0F9+Gdxtr\n\t8Of+FISZM6cS65uxN/iIf6HvSLXv6yMM8xpqMbnVDcKsNEs4wOe9DP8IDjJWT0veU68q\n\tIHuF1mLRunlAtrSEAte2CFYrvzxxUlym3q7yA8V22kEHXrE0tuncxl91xJwxRBixHhPw\n\tz48dY7e0f1dFNk/cAyfwgBFhWjA0pHbO4EszFkGCwqoRlBuEMR6VbYPyx77Zpx7R5fFK\n\tjXhrLTiNkJwyDX0T+KH1Lqk6s/pcxVsbnpT6mUvAKrMaYdlTpLAwTVVIKu9w8F5Rj28/\n\t8kVg==", "X-Gm-Message-State": "AOAM531T3vxQ+BzRsNVANH9rSvWhEJps7tGk15GrCdmU8/pBVCJ6LoQd\n\tgC20z16vU0dNP9L64/7e/Bhx9ZhlEhPBgQ==", "X-Google-Smtp-Source": "ABdhPJyli5Ufi3FIsyOfhQGGsFD/2GS+v+ES9ehsaJ+Z54FzqjWRiJvsq4eC92JYXmZOz8PLwfC5xQ==", "X-Received": "by 2002:a17:90a:7384:: with SMTP id\n\tj4mr8986444pjg.185.1635480880995; \n\tThu, 28 Oct 2021 21:14:40 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 29 Oct 2021 13:14:24 +0900", "Message-Id": "<20211029041424.1430886-7-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.33.1.1089.g2158813163f-goog", "In-Reply-To": "<20211029041424.1430886-1-hiroh@chromium.org>", "References": "<20211029041424.1430886-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 6/6] android: camera_request: Add\n\tthread safety annotation", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This applies clang thread safety annotation to\nCamera3RequestDescriptor. Mutex and MutexLocker there are\nreplaced with Mutex2 and MutexLocer2.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_request.h | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/android/camera_request.h b/src/android/camera_request.h\nindex cfafa445..0c8e7287 100644\n--- a/src/android/camera_request.h\n+++ b/src/android/camera_request.h\n@@ -9,10 +9,11 @@\n \n #include <map>\n #include <memory>\n-#include <mutex>\n #include <vector>\n \n #include <libcamera/base/class.h>\n+#include <libcamera/base/mutex.h>\n+#include <libcamera/base/thread_annotations.h>\n \n #include <libcamera/camera.h>\n #include <libcamera/framebuffer.h>\n@@ -46,8 +47,8 @@ public:\n \t};\n \n \t/* Keeps track of streams requiring post-processing. */\n-\tstd::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_;\n-\tstd::mutex streamsProcessMutex_;\n+\tstd::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_ GUARDED_BY(streamsProcessMutex_);\n+\tlibcamera::Mutex2 streamsProcessMutex_;\n \n \tCamera3RequestDescriptor(libcamera::Camera *camera,\n \t\t\t\t const camera3_capture_request_t *camera3Request);\n", "prefixes": [ "libcamera-devel", "RFC", "6/6" ] }