profile.h revision 1.1
11.1Sitojun/* $NetBSD: profile.h,v 1.1 1999/09/13 10:31:21 itojun Exp $ */ 21.1Sitojun 31.1Sitojun/* 41.1Sitojun * Copyright (c) 1992, 1993 51.1Sitojun * The Regents of the University of California. All rights reserved. 61.1Sitojun * 71.1Sitojun * Redistribution and use in source and binary forms, with or without 81.1Sitojun * modification, are permitted provided that the following conditions 91.1Sitojun * are met: 101.1Sitojun * 1. Redistributions of source code must retain the above copyright 111.1Sitojun * notice, this list of conditions and the following disclaimer. 121.1Sitojun * 2. Redistributions in binary form must reproduce the above copyright 131.1Sitojun * notice, this list of conditions and the following disclaimer in the 141.1Sitojun * documentation and/or other materials provided with the distribution. 151.1Sitojun * 3. All advertising materials mentioning features or use of this software 161.1Sitojun * must display the following acknowledgement: 171.1Sitojun * This product includes software developed by the University of 181.1Sitojun * California, Berkeley and its contributors. 191.1Sitojun * 4. Neither the name of the University nor the names of its contributors 201.1Sitojun * may be used to endorse or promote products derived from this software 211.1Sitojun * without specific prior written permission. 221.1Sitojun * 231.1Sitojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.1Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.1Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Sitojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.1Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.1Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.1Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.1Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.1Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.1Sitojun * SUCH DAMAGE. 341.1Sitojun * 351.1Sitojun * @(#)profile.h 8.1 (Berkeley) 6/11/93 361.1Sitojun */ 371.1Sitojun 381.1Sitojun#define _MCOUNT_DECL static __inline void _mcount 391.1Sitojun 401.1Sitojun#define MCOUNT \ 411.1Sitojunextern void mcount __P((void)) __asm__("mcount"); \ 421.1Sitojunvoid \ 431.1Sitojunmcount() \ 441.1Sitojun{ \ 451.1Sitojun} 461.1Sitojun 471.1Sitojun#ifdef _KERNEL 481.1Sitojun/* 491.1Sitojun * Note that we assume splhigh() and splx() cannot call mcount() 501.1Sitojun * recursively. 511.1Sitojun */ 521.1Sitojun#define MCOUNT_ENTER s = splhigh() 531.1Sitojun#define MCOUNT_EXIT splx(s) 541.1Sitojun#endif /* _KERNEL */ 55