From patchwork Tue Jul 13 11:57:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis_Hampton@SERCOMM.COM X-Patchwork-Id: 1504577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=SMX/lHcO; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPK5m2tBmz9sXL for ; Tue, 13 Jul 2021 22:03:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-ID:To:From:MIME-Version: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9a4NpW6P7+S7ZnmEjHPutG98pc1teIVK6oBTzf5x99w=; b=SMX/lHcO0My794 8w/5ffYt9Uda0KVZsp0ZMUifntKZP5dxjK5r0KkyVHBZ7BFROGr+I9ke+yigD6ferejVdNG6133Ys zR13n8u6tWgW5d65z6GV2tU6+b+GD6Fh/X6B//OmNvQpfJXpUfIFaCmswvk632KPLVrKeoJVvIy7e FDcMJFGf5h823V0xrkjSHYZrB7Fts4ucgXW75MgWqUFB/j7rpD1ecOD1iO5KJL1sB6sgAvjXhvsrC mcc/KSS7TIqeOcqvQTprH68EDle45eo9+xcCpybF/AhaJOHiB5IuoSfatsaIyjs+a91B3I5SG6WJg 36nyduzG65NXk1k3m6Aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3H33-00AHwJ-C8; Tue, 13 Jul 2021 11:58:01 +0000 Received: from smtptp02.sercomm.com ([118.163.130.185]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3H2z-00AHvp-95 for openwrt-devel@lists.openwrt.org; Tue, 13 Jul 2021 11:57:58 +0000 Subject: [PATCH] ubus: add a private field to event handlers MIME-Version: 1.0 Auto-Submitted: auto-generated From: Louis_Hampton@SERCOMM.COM To: openwrt-devel@lists.openwrt.org Message-ID: Date: Tue, 13 Jul 2021 07:57:49 -0400 X-MIMETrack: Itemize by HTTP Server on NotesCloud/Sercomm(Release 10.0.1|November 29, 2018) at 07/13/2021 07:57:49 AM, =?big5_tw?b?U2VyaWFsaXpl?= =?big5_tw?b?IGJ5IFJvdXRlciBvbiBTTVRQVFAwMi9TZXJjb21tKFJlbGVhc2UgOS4wLjFGUDEw?= =?big5_tw?b?IEhGMzgzfE5vdmVtYmVyIDE5LCAyMDE4KSBhdCAyMDIxLzA3LzEzIKRVpMggMDc6?= =?big5_tw?b?NTc6NTc=?= , =?big5_tw?b?U2VyaWFsaXplIGNvbXBsZXRlIGF0IDIwMjEvMDcv?= =?big5_tw?b?MTMgpFWkyCAwNzo1Nzo1Nw==?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_045757_491754_D54A1251 X-CRM114-Status: UNSURE ( 7.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is particularly useful in multithreaded non-C FFI, where additional context from where the event handler was registered may be critical to ensuring the output of the event is sent to the right lo [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [118.163.130.185 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is particularly useful in multithreaded non-C FFI, where additional context from where the event handler was registered may be critical to ensuring the output of the event is sent to the right location. Signed-off-by: Louis Hampton --- libubus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libubus.h b/libubus.h index 6925514..e6af291 100644 --- a/libubus.h +++ b/libubus.h @@ -149,6 +149,7 @@ struct ubus_event_handler { struct ubus_object obj; ubus_event_handler_t cb; + void *priv; }; struct ubus_context {