From owner-freebsd-arch@FreeBSD.ORG Sat Feb 28 07:47:26 2004 Return-Path: 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 2731F16A4CE for ; Sat, 28 Feb 2004 07:47:26 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DBDA43D1D for ; Sat, 28 Feb 2004 07:47:25 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i1SFlN6t021850 for ; Sat, 28 Feb 2004 16:47:23 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: arch@freebsd.org From: Poul-Henning Kamp Date: Sat, 28 Feb 2004 16:47:23 +0100 Message-ID: <21849.1077983243@critter.freebsd.dk> Subject: EVENTHANDLER_FAST removal ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 15:47:26 -0000 Any objection to removing the unused EVENTHANDLER_FAST stuff ? Index: eventhandler.h =================================================================== RCS file: /home/ncvs/src/sys/sys/eventhandler.h,v retrieving revision 1.29 diff -u -r1.29 eventhandler.h --- eventhandler.h 24 Mar 2003 21:24:37 -0000 1.29 +++ eventhandler.h 28 Feb 2004 15:43:06 -0000 @@ -89,51 +89,6 @@ EHL_UNLOCK((list)); \ } while (0) - -/* - * Fast handler lists require the eventhandler list be present - * at link time. They don't allow addition of entries to - * unknown eventhandler lists, ie. each list must have an - * "owner". - * - * Fast handler lists must be defined once by the owner - * of the eventhandler list, and the declaration must be in - * scope at any point the list is manipulated. - */ -#define EVENTHANDLER_FAST_DECLARE(name, type) \ -extern struct eventhandler_list Xeventhandler_list_ ## name ; \ -struct eventhandler_entry_ ## name { \ - struct eventhandler_entry ee; \ - type eh_func; \ -}; \ -struct __hack - -#define EVENTHANDLER_FAST_DEFINE(name, type) \ -struct eventhandler_list Xeventhandler_list_ ## name = { #name }; \ -struct __hack - -#define EVENTHANDLER_FAST_INVOKE(name, ...) do { \ - struct eventhandler_list *_el = &Xeventhandler_list_ ## name ; \ - \ - if (_el->el_flags & EHL_INITTED) { \ - EHL_LOCK(_el); \ - _EVENTHANDLER_INVOKE(name, _el , ## __VA_ARGS__); \ - } \ -} while (0) - -#define EVENTHANDLER_FAST_REGISTER(name, func, arg, priority) \ - eventhandler_register(&Xeventhandler_list_ ## name, \ - #name, func, arg, priority) - -#define EVENTHANDLER_FAST_DEREGISTER(name, tag) do { \ - struct eventhandler_list *_el = &Xeventhandler_list_ ## name ; \ - \ - KASSERT(_el->el_flags & EHL_INITTED, \ - ("eventhandler_fast_deregister on un-inited list %s", ## name)); \ - EHL_LOCK(_el); \ - eventhandler_deregister(_el, tag); \ -} while (0) - /* * Slow handlers are entirely dynamic; lists are created * when entries are added to them, and thus have no concept of "owner", @@ -195,13 +150,6 @@ EVENTHANDLER_DECLARE(shutdown_pre_sync, shutdown_fn); /* before fs sync */ EVENTHANDLER_DECLARE(shutdown_post_sync, shutdown_fn); /* after fs sync */ EVENTHANDLER_DECLARE(shutdown_final, shutdown_fn); - -/* Idle process event */ -typedef void (*idle_eventhandler_t)(void *, int); - -#define IDLE_PRI_FIRST EVENTHANDLER_PRI_FIRST -#define IDLE_PRI_LAST EVENTHANDLER_PRI_LAST -EVENTHANDLER_FAST_DECLARE(idle_event, idle_eventhandler_t); /* Low memory event */ typedef void (*vm_lowmem_handler_t)(void *, int); -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.