{"id":14909,"url":"https://patchwork.libcamera.org/api/1.1/patches/14909/?format=json","web_url":"https://patchwork.libcamera.org/patch/14909/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211130155600.2203123-13-hiroh@chromium.org>","date":"2021-11-30T15:56:00","name":"[libcamera-devel,v3,12/12] android: camera_request: Add thread safety annotation","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"06a1fbc21f62b3c4ffefdef7c30f779dd32a45ca","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14909/mbox/","series":[{"id":2785,"url":"https://patchwork.libcamera.org/api/1.1/series/2785/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2785","date":"2021-11-30T15:55:48","name":"Introduce clang thread safety annotations","version":3,"mbox":"https://patchwork.libcamera.org/series/2785/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14909/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14909/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 6E5E0BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 15:56:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1FE6060723;\n\tTue, 30 Nov 2021 16:56:37 +0100 (CET)","from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com\n\t[IPv6:2607:f8b0:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1CB1C6073A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 16:56:31 +0100 (CET)","by mail-pl1-x62a.google.com with SMTP id q17so15243812plr.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 07:56:31 -0800 (PST)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:c90a:5a53:b139:1336])\n\tby smtp.gmail.com with ESMTPSA id\n\tpc10sm3510283pjb.9.2021.11.30.07.56.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 30 Nov 2021 07:56:28 -0800 (PST)"],"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=\"EeKYGWW0\"; 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=AD01gBVUs4CQ+fjG7LPawvO1+zYxIXKwRgpkBIL4u8I=;\n\tb=EeKYGWW0JxpblE7rBI5ROa8y47uV9a0n1Ud8lhk1xrF2l9SIUOJYbHz2ey5frxTYbA\n\tZ1lBp3LSfZ4oyXJrzY4ZE/dsC+r7BGeTtu6fOrSzp8F/ZSQ2heGHxtWPsXj4yv9SkTiD\n\t4qojWk6Dq7TticmsePbfYIj4DtKR733UHnB8w=","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=AD01gBVUs4CQ+fjG7LPawvO1+zYxIXKwRgpkBIL4u8I=;\n\tb=JNH4O+4RuIgNHYVK1me+KxMpCiAd9AhP7uRUTxM6C4yJzgVtcV9BaT38hht+YLnpYK\n\tliwfSHqOpnAr6Mejkga6CD9zmVKy68/E4BcrHsAFCZhoZMO8ubv+wWh7+xnHeJ7W2JeX\n\t88tOUr0tPoVnCkxZxc1GUvuRQeNc4/+47QXzmanppqpxzFahiw0KKIcF6w2VbrItptLn\n\t/cYL1SRLelI+Sx8ruG1Lo2QAgEo80PAM9rax5pZZEJMkhFup6sdPenTcXEjf467OjoZd\n\t3K2a4tD9MgNGsY79orjyTCW5/kSeMozow41od1pT7V5fSOIEbgeSHoZ5OlCpfjtIsP8m\n\tHf8A==","X-Gm-Message-State":"AOAM5320dIcZ7SON4PkAzp4mur4IGWf0uCAIBVMsZSeVAaUMh1Cn06+i\n\tEl+CvrcLId0k4+AvQDQp4fIFfYtgWMBFYQ==","X-Google-Smtp-Source":"ABdhPJzt5S72dL3cWzddfy2WusDnOjwQ1oZ+KaMMDwXRfAKbEcZ/KqTgWnpn+EzxP2dWjdXNoFsb0Q==","X-Received":"by 2002:a17:90a:e7cc:: with SMTP id\n\tkb12mr32513pjb.172.1638287789497; \n\tTue, 30 Nov 2021 07:56:29 -0800 (PST)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  1 Dec 2021 00:56:00 +0900","Message-Id":"<20211130155600.2203123-13-hiroh@chromium.org>","X-Mailer":"git-send-email 2.34.0.rc2.393.gf8c9666880-goog","In-Reply-To":"<20211130155600.2203123-1-hiroh@chromium.org>","References":"<20211130155600.2203123-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 12/12] 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.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_request.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)","diff":"diff --git a/src/android/camera_request.h b/src/android/camera_request.h\nindex 887dbe86..dfdc3324 100644\n--- a/src/android/camera_request.h\n+++ b/src/android/camera_request.h\n@@ -13,6 +13,7 @@\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@@ -57,7 +58,8 @@ public:\n \t};\n \n \t/* Keeps track of streams requiring post-processing. */\n-\tstd::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_;\n+\tstd::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_\n+\t\tLIBCAMERA_TSA_GUARDED_BY(streamsProcessMutex_);\n \tlibcamera::Mutex streamsProcessMutex_;\n \n \tCamera3RequestDescriptor(libcamera::Camera *camera,\n","prefixes":["libcamera-devel","v3","12/12"]}