Patch Detail
Show a patch.
GET /api/patches/15024/?format=api
{ "id": 15024, "url": "https://patchwork.libcamera.org/api/patches/15024/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15024/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20211203195539.1574621-3-hiroh@chromium.org>", "date": "2021-12-03T19:55:34", "name": "[libcamera-devel,2/7] ipa: raspberrypi: alsc: Apply clang thread annotation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "48f55865f8d73ca64e05a80b4806c1e985d3ba6a", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15024/mbox/", "series": [ { "id": 2814, "url": "https://patchwork.libcamera.org/api/series/2814/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2814", "date": "2021-12-03T19:55:32", "name": "Apply clang thread safety annotations to raspberrypi", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2814/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15024/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15024/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 47C50BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 3 Dec 2021 19:55:53 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F2ECC6084B;\n\tFri, 3 Dec 2021 20:55:52 +0100 (CET)", "from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com\n\t[IPv6:2607:f8b0:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A98856084B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 3 Dec 2021 20:55:50 +0100 (CET)", "by mail-pg1-x52b.google.com with SMTP id k4so4088355pgb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 03 Dec 2021 11:55:50 -0800 (PST)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:cd78:3a5f:d792:6177])\n\tby smtp.gmail.com with ESMTPSA id\n\tt3sm4265891pfj.207.2021.12.03.11.55.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 03 Dec 2021 11:55:48 -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=\"Di9J04HU\"; 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=RO9Q2ZQfZqnHQ5NMyWgaNj8q6JB0rVcfDQk63o9NYHk=;\n\tb=Di9J04HUAGfLV61wyyM1pKTbiI9S0vZHHapGYcgCPPlgFjykZJg8P+GSP0e31mLsfC\n\tSUkNb2SdFN9i2M9izfftBST+Z5rGlbbthKjcsGr4RCS0dBQIuKanrEIe/bM7PDWM2X/Z\n\t3DBAlEQDW2KA8Y6GtY5eGo5sfTGkokmYGyqng=", "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=RO9Q2ZQfZqnHQ5NMyWgaNj8q6JB0rVcfDQk63o9NYHk=;\n\tb=c7hZgvD9vNmB1rcwnoE/zgUNxDJx+2BSLbIPEb2KQlhfJIEfm7F71nSA8G5AbSBUTv\n\tcAXiEqFSqu13lD5QtvguWoQLJXa+LfjSWhCnvivFC+LF0ES7oPWt3StNlcar1jjUMA/p\n\tM3c2nLanKrKmqtk6eOAqBtWTLL3kTE4XWlCB0TAwTIENVgjpn1Og0Lgm1N10P3d8rGdS\n\tTUz6BbVrg7Mhd6y9gWJJMXvtH7DLS4XHIyQV2E+1sZVEquJIsPk68lDa7d8MNGNgoC5O\n\tIDzkqVoHp2QvrDIQpPx/MEdtdVz5qv4o9NleEJ71JKF9binpayhIyzqk0HZTq+RQmuod\n\t9lqA==", "X-Gm-Message-State": "AOAM532TvYl9QOC7PXUDr2cFcQbVt7Af8DmYM2/npWzJFFaMF9/Z+rrO\n\t18VuJjmMUfq3F76m/LAPdhB6zSm4OAo7cA==", "X-Google-Smtp-Source": "ABdhPJwgW0cNFlneVTKcmeT81A5vUv7OolqwmqIc0HxfNy4ya0LRN62YuVcfv5EUsw1y3YxgwROdmw==", "X-Received": "by 2002:a63:490c:: with SMTP id\n\tw12mr6252535pga.398.1638561348880; \n\tFri, 03 Dec 2021 11:55:48 -0800 (PST)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 4 Dec 2021 04:55:34 +0900", "Message-Id": "<20211203195539.1574621-3-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.34.1.400.ga245620fadb-goog", "In-Reply-To": "<20211203195539.1574621-1-hiroh@chromium.org>", "References": "<20211203195539.1574621-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/7] ipa: raspberrypi: alsc: Apply clang\n\tthread 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 annotates member functions and variables of Alsc by clang\nthread safety annotations.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/ipa/raspberrypi/controller/rpi/alsc.cpp | 4 ++--\n src/ipa/raspberrypi/controller/rpi/alsc.hpp | 8 ++++----\n 2 files changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\nindex 97a05a30..8f954106 100644\n--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n@@ -180,7 +180,7 @@ void Alsc::waitForAysncThread()\n \tif (async_started_) {\n \t\tasync_started_ = false;\n \t\tMutexLocker lock(mutex_);\n-\t\tsync_signal_.wait(lock, [&] {\n+\t\tsync_signal_.wait(lock, [&]() LIBCAMERA_TSA_REQUIRES(mutex_) {\n \t\t\treturn async_finished_;\n \t\t});\n \t\tasync_finished_ = false;\n@@ -371,7 +371,7 @@ void Alsc::asyncFunc()\n \twhile (true) {\n \t\t{\n \t\t\tMutexLocker lock(mutex_);\n-\t\t\tasync_signal_.wait(lock, [&] {\n+\t\t\tasync_signal_.wait(lock, [&]() LIBCAMERA_TSA_REQUIRES(mutex_) {\n \t\t\t\treturn async_start_ || async_abort_;\n \t\t\t});\n \t\t\tasync_start_ = false;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/alsc.hpp b/src/ipa/raspberrypi/controller/rpi/alsc.hpp\nindex 3f9d6837..f1f2aa0d 100644\n--- a/src/ipa/raspberrypi/controller/rpi/alsc.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/alsc.hpp\n@@ -69,11 +69,11 @@ private:\n \t// condvar for synchronous thread to wait on\n \tlibcamera::ConditionVariable sync_signal_;\n \t// for sync thread to check if async thread finished (requires mutex)\n-\tbool async_finished_;\n+\tbool async_finished_ LIBCAMERA_TSA_GUARDED_BY(mutex_);\n \t// for async thread to check if it's been told to run (requires mutex)\n-\tbool async_start_;\n+\tbool async_start_ LIBCAMERA_TSA_GUARDED_BY(mutex_);\n \t// for async thread to check if it's been told to quit (requires mutex)\n-\tbool async_abort_;\n+\tbool async_abort_ LIBCAMERA_TSA_GUARDED_BY(mutex_);\n \n \t// The following are only for the synchronous thread to use:\n \t// for sync thread to note its has asked async thread to run\n@@ -91,7 +91,7 @@ private:\n \t// thread can set/reset them if the async thread is known to be idle:\n \tvoid restartAsync(StatisticsPtr &stats, Metadata *image_metadata);\n \t// copy out the results from the async thread so that it can be restarted\n-\tvoid fetchAsyncResults();\n+\tvoid fetchAsyncResults() LIBCAMERA_TSA_REQUIRES(mutex_);\n \tdouble ct_;\n \tbcm2835_isp_stats_region statistics_[ALSC_CELLS_Y * ALSC_CELLS_X];\n \tdouble async_results_[3][ALSC_CELLS_Y][ALSC_CELLS_X];\n", "prefixes": [ "libcamera-devel", "2/7" ] }