From owner-freebsd-arch Mon Mar 24 5:10:11 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51DAA37B401; Mon, 24 Mar 2003 05:10:09 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2952943F75; Mon, 24 Mar 2003 05:10:08 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.8/8.12.8) with ESMTP id h2ODFcxS078938; Mon, 24 Mar 2003 08:15:38 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.8/8.12.8/Submit) id h2ODFcnb078937; Mon, 24 Mar 2003 08:15:38 -0500 (EST) Date: Mon, 24 Mar 2003 08:15:38 -0500 From: Jake Burkholder To: John Baldwin Cc: arch@FreeBSD.ORG Subject: Re: Convert process at_foo events to eventhandlers Message-ID: <20030324081538.Y76446@locore.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.ORG on Fri, Mar 21, 2003 at 03:19:29PM -0500 X-Spam-Status: No, hits=-29.0 required=5.0 tests=AWL,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Fri, Mar 21, 2003 at 03:19:29PM -0500, John Baldwin said words to the effect of; > I'd like to convert the process at_fork, at_exec, and at_exit > events to be regular eventhandlers instead. This way I get to > leverage the locking of the existing eventhandlers w/o having > to duplicate it in three other places. The patch to do this is > at http://www.FreeBSD.org/~jhb/patches/proc_event.patch. > Note that the old API (at_foo, rm_at_foo) has been removed as > I can not easily implement the rm_at_foo functionality using > eventhandlers since eventhandlers allow for multiple instances > of a function in a list and use cookies instead of using the > function pointer directly to remove events. There is precedent > for this in that at_shutdown() also died when at_shutdown() was > converted to an eventhandler. This patch also defines some > generic eventhandler priorities so that users of eventhandlers > don't always have to define new constants for priorities. > > Comments? Do it! Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message