Patch Detail
Show a patch.
GET /api/1.1/patches/15736/?format=api
{ "id": 15736, "url": "https://patchwork.libcamera.org/api/1.1/patches/15736/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15736/", "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": "<20220427152640.2192-1-ecurtin@redhat.com>", "date": "2022-04-27T15:26:40", "name": "[libcamera-devel] libcamera: base: Make MutexLocker(Mutex &mutex) non-blocking", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": false, "hash": "a9f049c8682ed44fba6e6b214c3957d7608c8bdb", "submitter": { "id": 101, "url": "https://patchwork.libcamera.org/api/1.1/people/101/?format=api", "name": "Eric Curtin", "email": "ecurtin@redhat.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15736/mbox/", "series": [ { "id": 3079, "url": "https://patchwork.libcamera.org/api/1.1/series/3079/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3079", "date": "2022-04-27T15:26:40", "name": "[libcamera-devel] libcamera: base: Make MutexLocker(Mutex &mutex) non-blocking", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3079/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15736/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15736/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 A25D3C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Apr 2022 15:26:56 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1036365644;\n\tWed, 27 Apr 2022 17:26:56 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE9AC6042F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Apr 2022 17:26:54 +0200 (CEST)", "from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n\t[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-50-X101-Vm7PMqy4p3bKjg6YQ-1; Wed, 27 Apr 2022 11:26:52 -0400", "by mail-wr1-f70.google.com with SMTP id\n\tt17-20020adfa2d1000000b0020ac519c222so879830wra.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Apr 2022 08:26:51 -0700 (PDT)", "from localhost.localdomain\n\t([2001:bb6:9634:7100:33b0:c1b1:8875:4adb])\n\tby smtp.gmail.com with ESMTPSA id\n\te30-20020adf9bde000000b0020aeafa418dsm2600034wrc.14.2022.04.27.08.26.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 27 Apr 2022 08:26:49 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1651073216;\n\tbh=LAEZO0dKJPnAyTjHsGcBpa2Cl4czd6wQFDOFxrkY1Gc=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=kthit8Vs4w0fTLyNL3R5i/B7OkTrKVq21aFON6SBhzb4b6gMp1Pl5nq5YTKdsQi3l\n\tWXBO6Ll3PpaHDoUrepnernXN6RqJh8AmS+0ZuKj96MKY7cHB9KWVUJBEI2Vk2Qx/h3\n\trHNuhSilNJ8uvfeDwaRpSuS4/4asBs1mKIK6B6mW1SHiiNBvcwFp3jwsu00a7XNKAb\n\tAarAiIriE1xnCPpJVaxi8megumAU8qldcrIg59XVXxwM/TxYN/ouKHDFofwKLjd+3F\n\tIEuKhPBDDI96/PwDp5PNUqNDr3Lh8fF2bWxkGG8qStYvzSl2B3MuEFB0c22wC0+NJq\n\tIKO3/YwJzVGiQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1651073213;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=3WIJXXPY8QbYrl/Cd9IRy29MzVEf0rqTXCyvCILt5NE=;\n\tb=DE3yqGI9zzFnDa1ssY91F/pQOPqZjqyC0EWM57ceIU/YubgyNTO8qboC52ZjU//DBXDbRT\n\tp1n7HVgadeEdwGOM1GQxy4mO9+3xSDl2MV6O60yU+EuVAr57eIAsBY2yqQICcRCbWRJBcE\n\tdSsDVyIj4JaujowfBB86gINzlocmgmc=" ], "Authentication-Results": [ "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"DE3yqGI9\"; \n\tdkim-atps=neutral", "relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ecurtin@redhat.com" ], "X-MC-Unique": "X101-Vm7PMqy4p3bKjg6YQ-1", "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:mime-version\n\t:content-transfer-encoding;\n\tbh=3WIJXXPY8QbYrl/Cd9IRy29MzVEf0rqTXCyvCILt5NE=;\n\tb=xDq1P1EAKSYLi6Jt8DEBqsE/KiygTvlPjFumFdMdWY+UZ3yuDeaP32NZZkX5T7Yr5t\n\tTOYbcYu5SS3b0xNkBqTzDabgns6UtDj4ucwXwJbQ+jcvRlUCbCSuYJB+Ppy9JW+3XLQB\n\tTR2US3jWC0HqcuWmCd8IEg6rMKrXedd5T2krITvTaV5e7kafYlcpzMF7d7cp1TcDrcMr\n\tt72fRYEro2nTotmnm7eWsstEECwuKr7jV+DdV04UWp/ZMD6imVxghGFdcYvLbk0+5wE8\n\tgvNg+liJxX3/KYg5pPG7v+ED+Cis0QE4zjF3rRhzGkDz+zUZAGJ2NYpa4DpRrjTPVMHO\n\tz6+w==", "X-Gm-Message-State": "AOAM531ycvbNaD/Xi7qr6KHX9kC/FGuIpi8+2ePjZ2y+hUpNHdwHlm+X\n\tZOIY2vcvyCnLNnm8xa7dyisdL+rCCLrQcfWadyFG6zAZM070CRdviRWZ3NVWE0fhBxkdCuHG0sd\n\tGennY0iF2SZiePsIn7z/WDPSdZOz30pIQZQq5enGwMpdC+3vzhx/MnfDAvRv1X+acaTSYj6BMr0\n\toYzn02rfAk", "X-Received": [ "by 2002:adf:e60a:0:b0:20a:c402:6810 with SMTP id\n\tp10-20020adfe60a000000b0020ac4026810mr23484529wrm.45.1651073210477; \n\tWed, 27 Apr 2022 08:26:50 -0700 (PDT)", "by 2002:adf:e60a:0:b0:20a:c402:6810 with SMTP id\n\tp10-20020adfe60a000000b0020ac4026810mr23484511wrm.45.1651073210187; \n\tWed, 27 Apr 2022 08:26:50 -0700 (PDT)" ], "X-Google-Smtp-Source": "ABdhPJxvkyxP2aIzkdDK1OFcGVfg8ediCMubQg4jQQwN88M0oR3T7sJMh4IMyP27DI8SnuVvLPTotQ==", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 27 Apr 2022 16:26:40 +0100", "Message-Id": "<20220427152640.2192-1-ecurtin@redhat.com>", "X-Mailer": "git-send-email 2.35.1", "MIME-Version": "1.0", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "Subject": "[libcamera-devel] [PATCH] libcamera: base: Make MutexLocker(Mutex\n\t&mutex) non-blocking", "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>", "From": "Eric Curtin via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Eric Curtin <ecurtin@redhat.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Camera::acquire claims to be non-blocking, in order to achieve this,\nstd::unique_lock<std::mutex> constructor must be called with\ntry_to_lock so it doesn't block if a lock cannot be obtained.\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=127\nSigned-off-by: Eric Curtin <ecurtin@redhat.com>\n---\n include/libcamera/base/mutex.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/include/libcamera/base/mutex.h b/include/libcamera/base/mutex.h\nindex 2d23e49e..c4a5f791 100644\n--- a/include/libcamera/base/mutex.h\n+++ b/include/libcamera/base/mutex.h\n@@ -45,7 +45,7 @@ class LIBCAMERA_TSA_SCOPED_CAPABILITY MutexLocker final\n {\n public:\n \texplicit MutexLocker(Mutex &mutex) LIBCAMERA_TSA_ACQUIRE(mutex)\n-\t\t: lock_(mutex.mutex_)\n+\t\t: lock_(mutex.mutex_, std::try_to_lock)\n \t{\n \t}\n \n", "prefixes": [ "libcamera-devel" ] }