From patchwork Thu May 5 15:18:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Curtin X-Patchwork-Id: 15800 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 6E2EAC3256 for ; Thu, 5 May 2022 15:19:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2FC226563F; Thu, 5 May 2022 17:19:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1651763957; bh=j12gqWSP+QeX2PBTiuHIllAFBnA20FVAmFnqRzibGSU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=O1zNWcafurIIvErlbG5lDo8XysC5bCilZMCnqAxPhDD99Njdbqb0/+aH8hFAaLqxz +WVGuw3e9IbxmZvrUxREnCNfcV6cGMBwi2MQFXb5WYuKxyNFJK2PouiZJ+iE60KjKq uG9TjCl8zFkB05jh2hhFDUKsusajvVbZHUmHi9f1J3Xbylyp6imtJnqg9Luz9YuyUD k3MCTrOG0YWs5z+QVvFAlGNi83a4ilbtlY0fQh0WWEUTkdSNN9O5VoLbIRbYUB7r24 NrTECR641fC+GidOEMlE9awgRWJfO7QmDgFsD+v1Z23yI8Qgu5zpOFB9JBxemg4/sN kDp6x8akpadug== Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.133.74]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBB9760424 for ; Thu, 5 May 2022 17:19:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="RaItfkK4"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651763954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ju9IjSwBQXYcqiAXugQthBm4b9ZwKNEBO0Yd1CGdgfc=; b=RaItfkK4rCW0eCWJT7wwxmpjQCnFnWZOnYnNPfae5BmsfrpRdJa1sDGtKJvNkRz2Dj5wg0 pOUsAXi7uYnC7j81keTKM5QT9chmiul/CTcJKzeNrXfkBpCCQU5fM4cszUY0rLykc7TLk/ Ph52ljLyF1vPXpN7yN55J1YlNpP/7Ig= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-9baQjdThP5u1YwRxoPJUDA-1; Thu, 05 May 2022 11:19:13 -0400 X-MC-Unique: 9baQjdThP5u1YwRxoPJUDA-1 Received: by mail-wm1-f72.google.com with SMTP id t184-20020a1c46c1000000b00394209f54f1so1841630wma.4 for ; Thu, 05 May 2022 08:19:13 -0700 (PDT) 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=Ju9IjSwBQXYcqiAXugQthBm4b9ZwKNEBO0Yd1CGdgfc=; b=ho00zK+vvozCRT6osqdgUj9zMwFeM8MLJ5rF8m1hM5VvGNZNEvYpzNApcccB28s9OS oN2XkEptl0hslwpQAA6+AD0avbq1jg0lHJk6f2zEFNwQeEj6vZyuxUHH5I2TL9+2lnUv jC747ffZ1w6EAJMd6XExjDr0Jq+OvyADSqTdxudnXwBhJWD9h7pOV6AKFeVQOHwpQnNa vZBOMYEybPAWyvwVHyy5Gn621z89LCu2ruk8IxG29YisJg+RVzGRP/MGU1vVYXyvnzeh wMxxnaiAUCPOzIY3I5PFUPnSi8IF7ghC67qSNveiRW92kb6oEEKCR86v2TKZsDmIDpdr f4DQ== X-Gm-Message-State: AOAM531TTBEjtBN0uWe4FBTWgsXLhAPRB9F3Pr2/uRYtX8+Rcv2Lahsy ImnOoMWKiLANxak86AUZ9wO1w0nMFvIbRjyoCEFgt+0Ds3owaDfNGjCcw8Gs4UMpHhAB8VG/9Zb vMVI9Cr5yVReLexeEbHnfG2h3y44PsRCk3nQVObepGEu0oQcyyJ5wJMn3t1DJUNYY/xzhCFH6jc fHx2oxNanY X-Received: by 2002:a7b:c017:0:b0:394:5631:62bc with SMTP id c23-20020a7bc017000000b00394563162bcmr5546153wmb.190.1651763952160; Thu, 05 May 2022 08:19:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL873gDGidlmw/mvn5ViRfENkhZ5JO8iXCPwxFGfWlgVSJVCtaWIwdcF/ot5yygvT5PanXUA== X-Received: by 2002:a7b:c017:0:b0:394:5631:62bc with SMTP id c23-20020a7bc017000000b00394563162bcmr5546117wmb.190.1651763951878; Thu, 05 May 2022 08:19:11 -0700 (PDT) Received: from localhost.localdomain ([2001:bb6:9634:7100:33b0:c1b1:8875:4adb]) by smtp.gmail.com with ESMTPSA id z6-20020a056000110600b0020ad05214d5sm1434819wrw.2.2022.05.05.08.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 08:19:11 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 5 May 2022 16:18:49 +0100 Message-Id: <20220505151851.2421-2-ecurtin@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220505151851.2421-1-ecurtin@redhat.com> References: <20220505151851.2421-1-ecurtin@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ecurtin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [libcamera-devel] [PATCH v8 2/4] cam: event_loop: Rename addEvent to addFDEvent 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: , X-Patchwork-Original-From: Eric Curtin via libcamera-devel From: Eric Curtin Reply-To: Eric Curtin Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Since we now have two types of events addFDEvent and addTimerEvent. Signed-off-by: Eric Curtin Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/cam/drm.cpp | 4 ++-- src/cam/event_loop.cpp | 4 ++-- src/cam/event_loop.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp index 46e34eb5..421cd61a 100644 --- a/src/cam/drm.cpp +++ b/src/cam/drm.cpp @@ -432,8 +432,8 @@ int Device::init() if (ret < 0) return ret; - EventLoop::instance()->addEvent(fd_, EventLoop::Read, - std::bind(&Device::drmEvent, this)); + EventLoop::instance()->addFDEvent(fd_, EventLoop::Read, + std::bind(&Device::drmEvent, this)); return 0; } diff --git a/src/cam/event_loop.cpp b/src/cam/event_loop.cpp index 181c971c..0c2176c7 100644 --- a/src/cam/event_loop.cpp +++ b/src/cam/event_loop.cpp @@ -64,8 +64,8 @@ void EventLoop::callLater(const std::function &func) event_base_once(base_, -1, EV_TIMEOUT, dispatchCallback, this, nullptr); } -void EventLoop::addEvent(int fd, EventType type, - const std::function &callback) +void EventLoop::addFDEvent(int fd, EventType type, + const std::function &callback) { std::unique_ptr event = std::make_unique(callback); short events = (type & Read ? EV_READ : 0) diff --git a/src/cam/event_loop.h b/src/cam/event_loop.h index 89215dce..d921cd8f 100644 --- a/src/cam/event_loop.h +++ b/src/cam/event_loop.h @@ -36,8 +36,8 @@ public: void callLater(const std::function &func); - void addEvent(int fd, EventType type, - const std::function &handler); + void addFDEvent(int fd, EventType type, + const std::function &handler); void addTimerEvent(const std::chrono::milliseconds d, const std::function &handler);