Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2003 14:18:39 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25118 for review
Message-ID:  <200302132218.h1DMIdBK015357@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <arch>/<arch>/critical.c	- prototyped
  *
  * $FreeBSD$
  */
@@ -28,8 +18,51 @@
 #ifndef _MACHINE_CRITICAL_H_
 #define	_MACHINE_CRITICAL_H_
 
+__BEGIN_DECLS
+
 /*
- * Nothing to see here.
+ * Prototypes - see <arch>/<arch>/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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302132218.h1DMIdBK015357>