From patchwork Fri Dec 3 16:46:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 15019 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 1550DC3250 for ; Fri, 3 Dec 2021 16:46:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B9B27607DE; Fri, 3 Dec 2021 17:46:38 +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="ke8+NzHz"; dkim-atps=neutral Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B887360832 for ; Fri, 3 Dec 2021 17:46:36 +0100 (CET) Received: by mail-pj1-x1029.google.com with SMTP id n15-20020a17090a160f00b001a75089daa3so5631321pja.1 for ; Fri, 03 Dec 2021 08:46:36 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=JaMrsxLXuEEZtzL4x5CBJKy9cwdODa5T8VqnK8aUtUU=; b=ke8+NzHzsoGLQwq91uklPiglqgf32s2wqbJF8hlJwmQDEWU8lKdhn/5fxacdrOcWnt TTdcfwe1gBso8XFT9RHc7xFTkI9dlLztkHw8AghMmfATvPzW+eUQ93wyhG6vL3MsTf+p SAZ7EP3BVzSEYhBQAOIRTMYt/SSwUatV34jFY= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=JaMrsxLXuEEZtzL4x5CBJKy9cwdODa5T8VqnK8aUtUU=; b=6Ubq4WbTZcws3jRWAa5oVwORGAfu2rQI+pWn9Gbeb0UnCVaojFbzvRJl4HVd2c4iiE a1CdGE41Qh/TAj2XmfbRrJLWykL0YJHLCJZqCLdqCop9Aw+iJPhKghsY9ISwSXHJlkCt iZML4Eaarudt4rXhUs7E51QWMuqa+hq7CKz1xiCE+0LFyPwEjNKJSyhpCsy0lPUxDROF eN4lfZG/EGjQ5QXZSvVPXMHZHtqp/4P0WeXWCSG9PH+A0XXh2WeSBHDffYhX12TqwO/g i2LQy2jcrdY7bGjGaPwqmMrWKZL62ZeVXe3tvc8ZNCtnKJuP9WWXcLI7eM+bjugeBp3u g4Gg== X-Gm-Message-State: AOAM532M5LWLtrvpMeOD65p1ZuFogtzsgnsZqNwg2MEXWMFMOMoEclql I+B0ionpRMJ50NHXVFDxHsMMJ7Ks2k/QJQ== X-Google-Smtp-Source: ABdhPJwQBM2YApX62D2fA7o/YXEf9HVKGINIA8KQFEUwkw46Q0pd7bGbzGtB/JgwfDo5xLFA7SA6/w== X-Received: by 2002:a17:90b:fd5:: with SMTP id gd21mr15848909pjb.37.1638549995041; Fri, 03 Dec 2021 08:46:35 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 08:46:34 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Sat, 4 Dec 2021 01:46:18 +0900 Message-Id: <20211203164619.1541033-7-hiroh@chromium.org> X-Mailer: git-send-email 2.34.0.384.gca35af8252-goog In-Reply-To: <20211203164619.1541033-1-hiroh@chromium.org> References: <20211203164619.1541033-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 6/7] v4l2: v4l2_camera_proxy: Apply clang thread safety annotation 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 annotates member functions of V4L2CameraProxy by clang thread safety annotations. Signed-off-by: Hirokazu Honda --- src/v4l2/v4l2_camera_proxy.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h index fa0a49e0..993562ef 100644 --- a/src/v4l2/v4l2_camera_proxy.h +++ b/src/v4l2/v4l2_camera_proxy.h @@ -27,12 +27,14 @@ class V4L2CameraProxy public: V4L2CameraProxy(unsigned int index, std::shared_ptr camera); - int open(V4L2CameraFile *file); - void close(V4L2CameraFile *file); - void *mmap(void *addr, size_t length, int prot, int flags, off64_t offset); - int munmap(void *addr, size_t length); - - int ioctl(V4L2CameraFile *file, unsigned long request, void *arg); + int open(V4L2CameraFile *file) LIBCAMERA_TSA_EXCLUDES(proxyMutex_); + void close(V4L2CameraFile *file) LIBCAMERA_TSA_EXCLUDES(proxyMutex_); + void *mmap(void *addr, size_t length, int prot, int flags, off64_t offset) + LIBCAMERA_TSA_EXCLUDES(proxyMutex_); + int munmap(void *addr, size_t length) LIBCAMERA_TSA_EXCLUDES(proxyMutex_); + + int ioctl(V4L2CameraFile *file, unsigned long request, void *arg) + LIBCAMERA_TSA_EXCLUDES(proxyMutex_); private: bool validateBufferType(uint32_t type);