From owner-p4-projects@FreeBSD.ORG Tue Jul 4 09:45:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E254A16A4E0; Tue, 4 Jul 2006 09:45:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC9F916A4DA for ; Tue, 4 Jul 2006 09:45:46 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DB2F43D45 for ; Tue, 4 Jul 2006 09:45:46 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k649jkOu022082 for ; Tue, 4 Jul 2006 09:45:46 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k649jkPG022079 for perforce@freebsd.org; Tue, 4 Jul 2006 09:45:46 GMT (envelope-from piso@freebsd.org) Date: Tue, 4 Jul 2006 09:45:46 GMT Message-Id: <200607040945.k649jkPG022079@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 100556 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 09:45:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=100556 Change 100556 by piso@piso_newluxor on 2006/07/04 09:45:26 Axe 4.x support. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#5 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#5 (text+ko) ==== @@ -66,10 +66,6 @@ #ifdef _KERNEL -#if __FreeBSD_version >= 500000 - -/* Fine grained locking for 5.x, 6.x and 7.x */ - #define LIBALIAS_LOCK_INIT(_chain) \ mtx_init(&(_chain)->mtx, "libalias list of proto-handlers", NULL, \ MTX_DEF | MTX_RECURSE) @@ -127,57 +123,7 @@ if (mtx_initialized(&c->mtx)) LIBALIAS_LOCK_DESTROY(c); } -#else - -/* Good old spl*() locking for 4.x */ -/* - * XXX - i'm not sure about mutex & conditional var - * conversion that i did using spl*()... - */ - -#define LIBALIAS_LOCK_INIT(_chain) (_chain)->spl = 0 -#define LIBALIAS_LOCK_DESTROY(_chain) -#define LIBALIAS_WLOCK_ASSERT(_chain) do { \ - KASSERT(_chain->spl != 0, ("chain not locked")); \ -} while (0) - -static __inline void -LIBALIAS_RLOCK(struct chain *chain) -{ - chain->spl = splimp(); -} - -static __inline void -LIBALIAS_RUNLOCK(struct chain *chain) -{ - splx(chain->spl); -} - -static __inline void -LIBALIAS_WLOCK(struct chain *chain) -{ - LIBALIAS_RLOCK(chain); -} - -static __inline void -LIBALIAS_WUNLOCK(struct chain *chain) -{ - LIBALIAS_RUNLOCK(chain); -} -static void -_handler_chain_init(struct chain *c) { - - c->spl = 0; -} - -static void -_handler_chain_destroy(struct chain *c) { - - ; -} - -#endif #else #define LIBALIAS_LOCK_INIT(_chain) ;