From patchwork Fri Dec 3 16:46:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 15013 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A41E7BF415 for ; Fri, 3 Dec 2021 16:46:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAE196084A; Fri, 3 Dec 2021 17:46:28 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gjUV5utw"; dkim-atps=neutral Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 06A6F60725 for ; Fri, 3 Dec 2021 17:46:27 +0100 (CET) Received: by mail-pg1-x52f.google.com with SMTP id s137so3613161pgs.5 for ; Fri, 03 Dec 2021 08:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7pFg/FZhwigJmeuCUamtZcLiZkZhm6P3gNkvuRg1x1o=; b=gjUV5utwEmSCedvtH8NxUZfW4SkeJD7ce+tlvmBVxDBzaSozcafL1fIGxa1ozu+9Y8 hcQFPjCCP1OeGW2zsvPM3UQtSG0pmEJpd5K4yo5d/e10JrKkAz2o1afEaBnqG+8RteCT jsGYcH1B6sBiVWMIaG3mzXdYvnO7mKaAeFFB4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7pFg/FZhwigJmeuCUamtZcLiZkZhm6P3gNkvuRg1x1o=; b=69/QzK56+A9CccRVMJzEE7zxPmSeHI3IfEh7NsYXHcoBlae/zNHPk5gmk970j/PnCE ZIiX7Ke5WwPa49mSmFUSMDWWAmDZyPIWWY+Vv+FI6KA9xRexpMZa5rYbJvtOgYXDwxba iO8Z5de8uwvdx1Yx0w+8n7PoGF4b2bnmFW61OdU4IBb2DqYbPIiQQPjq3BP5K+IROegd yUSRMCO02vL6ICen3mdpZuDv/xakJYJkOEkq8CwTCYYG2YB7suQ4gK6is79lxwzFqSIM NmV5TT/JawUoO82O6+61KMiQcdFN5+x/rNKbtxw2zqOuoGpR3rMu4iLEAEocglpr5Vw9 +xfg== X-Gm-Message-State: AOAM530UjO2WcZDs5nqacVydCPBMWf4nRXlaJmWRc0xBqPH7TEBB0XPh 5mkPs4fEtPHpCuzWhX3wjSMxNE5e358hkQ== X-Google-Smtp-Source: ABdhPJySE9UIcz7Folzrp13P9HUV9wzPV9iNzoU5ZrXLL6mKFLzZAeaBPorqzVOH5168PUIfqhz07A== X-Received: by 2002:a05:6a00:10d3:b0:4a4:e516:826f with SMTP id d19-20020a056a0010d300b004a4e516826fmr20333251pfu.70.1638549984913; Fri, 03 Dec 2021 08:46:24 -0800 (PST) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:cd78:3a5f:d792:6177]) by smtp.gmail.com with ESMTPSA id h18sm4123149pfh.172.2021.12.03.08.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 08:46:24 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Sat, 4 Dec 2021 01:46:12 +0900 Message-Id: <20211203164619.1541033-1-hiroh@chromium.org> X-Mailer: git-send-email 2.34.0.384.gca35af8252-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/7] Apply clang thread safety annotation libcamera-core and v4l2 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This applies clang thread safety annotations to libcamera/base, and libcamera/camera_manager and v4l2. I cannot annotate Signal and some variables in thread.cpp is because the used Mutexes are invisible from their header files. Hirokazu Honda (7): libcamera: base: semaphore: Apply clang thread safety annotation libcamera: base: thread: Protect exitCode by mutex in exit() libcamera: base: thread: Apply clang thread safety annotation libcamera: camera_manager: Protect cameras_ by mutex in cleanup() libcamera: camera_manager: Apply clang thread safety annotation v4l2: v4l2_camera_proxy: Apply clang thread safety annotation v4l2: v4l2_camera: Apply clang thread safety annotation include/libcamera/base/semaphore.h | 10 +++++----- src/libcamera/base/semaphore.cpp | 2 +- src/libcamera/base/thread.cpp | 24 +++++++++++++++++------- src/libcamera/camera_manager.cpp | 20 ++++++++++++-------- src/v4l2/v4l2_camera.cpp | 5 ++--- src/v4l2/v4l2_camera.h | 14 ++++++++------ src/v4l2/v4l2_camera_proxy.h | 14 ++++++++------ 7 files changed, 53 insertions(+), 36 deletions(-) --- 2.34.0.384.gca35af8252-goog