From owner-p4-projects Thu Feb 13 14:18:45 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6527337B405; Thu, 13 Feb 2003 14:18:41 -0800 (PST) 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 DFD4737B401 for ; Thu, 13 Feb 2003 14:18:40 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68EE443F75 for ; Thu, 13 Feb 2003 14:18:40 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1DMIebv015360 for ; Thu, 13 Feb 2003 14:18:40 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1DMIdBK015357 for perforce@freebsd.org; Thu, 13 Feb 2003 14:18:39 -0800 (PST) Date: Thu, 13 Feb 2003 14:18:39 -0800 (PST) Message-Id: <200302132218.h1DMIdBK015357@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 25118 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=25118 Change 25118 by jmallett@jmallett_dalek on 2003/02/13 14:17:56 Just make this a stub, and use the format of the others. Affected files ... .. //depot/projects/mips/sys/mips/include/critical.h#2 edit Differences ... ==== //depot/projects/mips/sys/mips/include/critical.h#2 (text+ko) ==== @@ -1,26 +1,16 @@ /*- - * Copyright (c) 2003 Juli Mallett. All rights reserved. + * Copyright (c) 2002 Matthew Dillon. This code is distributed under + * the BSD copyright, /usr/src/COPYRIGHT. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * This file contains prototypes and high-level inlines related to + * machine-level critical function support: * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * cpu_critical_enter() - inlined + * cpu_critical_exit() - inlined + * cpu_critical_fork_exit() - prototyped + * cpu_thread_link() - prototyped + * related support functions residing + * in //critical.c - prototyped * * $FreeBSD$ */ @@ -28,8 +18,51 @@ #ifndef _MACHINE_CRITICAL_H_ #define _MACHINE_CRITICAL_H_ +__BEGIN_DECLS + /* - * Nothing to see here. + * Prototypes - see //critical.c + */ +void cpu_critical_fork_exit(void); +void cpu_thread_link(struct thread *td); + +#ifdef __GNUC__ + +/* + * cpu_critical_enter: + * + * This routine is called from critical_enter() on the 0->1 transition + * of td_critnest, prior to it being incremented to 1. + */ + +static __inline void +cpu_critical_enter(void) +{ + struct thread *td = curthread; +} + +/* + * cpu_critical_exit: + * + * This routine is called from critical_exit() on a 1->0 transition + * of td_critnest, after it has been decremented to 0. We are + * exiting the last critical section. */ +static __inline void +cpu_critical_exit(void) +{ + struct thread *td = curthread; +} + + +#else /* !__GNUC__ */ +void cpu_critical_enter(void) +void cpu_critical_exit(void) + +#endif /* __GNUC__ */ + +__END_DECLS + #endif /* !_MACHINE_CRITICAL_H_ */ + To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message