xref: /openbsd-src/sys/arch/hppa/include/profile.h (revision 29295d1c5caf158d3a732746704292e9a80a32d2)
1*29295d1cSmillert /*	$OpenBSD: profile.h,v 1.3 2003/06/02 23:27:46 millert Exp $	*/
262a8fba3Smickey 
362a8fba3Smickey /*
462a8fba3Smickey  * Copyright (c) 1992, 1993
562a8fba3Smickey  *	The Regents of the University of California.  All rights reserved.
662a8fba3Smickey  *
762a8fba3Smickey  * Redistribution and use in source and binary forms, with or without
862a8fba3Smickey  * modification, are permitted provided that the following conditions
962a8fba3Smickey  * are met:
1062a8fba3Smickey  * 1. Redistributions of source code must retain the above copyright
1162a8fba3Smickey  *    notice, this list of conditions and the following disclaimer.
1262a8fba3Smickey  * 2. Redistributions in binary form must reproduce the above copyright
1362a8fba3Smickey  *    notice, this list of conditions and the following disclaimer in the
1462a8fba3Smickey  *    documentation and/or other materials provided with the distribution.
15*29295d1cSmillert  * 3. Neither the name of the University nor the names of its contributors
1662a8fba3Smickey  *    may be used to endorse or promote products derived from this software
1762a8fba3Smickey  *    without specific prior written permission.
1862a8fba3Smickey  *
1962a8fba3Smickey  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2062a8fba3Smickey  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2162a8fba3Smickey  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2262a8fba3Smickey  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2362a8fba3Smickey  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2462a8fba3Smickey  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2562a8fba3Smickey  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2662a8fba3Smickey  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2762a8fba3Smickey  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2862a8fba3Smickey  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2962a8fba3Smickey  * SUCH DAMAGE.
3062a8fba3Smickey  *
3162a8fba3Smickey  *	@(#)profile.h	8.1 (Berkeley) 6/11/93
3262a8fba3Smickey  */
3362a8fba3Smickey 
34aca8985cSmickey #define	_MCOUNT_DECL void _mcount
3562a8fba3Smickey 
36aca8985cSmickey #define	MCOUNT
3762a8fba3Smickey 
3862a8fba3Smickey #ifdef _KERNEL
3962a8fba3Smickey /*
4062a8fba3Smickey  * Note that we assume splhigh() and splx() cannot call mcount()
4162a8fba3Smickey  * recursively.
4262a8fba3Smickey  */
4362a8fba3Smickey #define	MCOUNT_ENTER	s = splhigh()
4462a8fba3Smickey #define	MCOUNT_EXIT	splx(s)
4562a8fba3Smickey #endif /* _KERNEL */
46