The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sparc64/include/profile.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
    3  * All rights reserved.
    4  *
    5  * Author: Chris G. Demetriou
    6  * 
    7  * Permission to use, copy, modify and distribute this software and
    8  * its documentation is hereby granted, provided that both the copyright
    9  * notice and this permission notice appear in all copies of the
   10  * software, derivative works or modified versions, and any portions
   11  * thereof, and that both notices appear in supporting documentation.
   12  * 
   13  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
   14  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
   15  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   16  * 
   17  * Carnegie Mellon requests users of this software to return to
   18  *
   19  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   20  *  School of Computer Science
   21  *  Carnegie Mellon University
   22  *  Pittsburgh PA 15213-3890
   23  *
   24  * any improvements or extensions that they make and grant Carnegie the
   25  * rights to redistribute these changes.
   26  *
   27  *      from: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp
   28  *      from: FreeBSD: src/sys/alpha/include/profile.h,v 1.4 1999/12/29
   29  * $FreeBSD: releng/6.0/sys/sparc64/include/profile.h 139825 2005-01-07 02:29:27Z imp $
   30  */
   31 
   32 #ifndef _MACHINE_PROFILE_H_
   33 #define _MACHINE_PROFILE_H_
   34 
   35 #define FUNCTION_ALIGNMENT 32
   36 #define _MCOUNT_DECL    void mcount
   37 #define MCOUNT
   38 
   39 typedef u_long  fptrdiff_t;
   40 
   41 #ifdef _KERNEL
   42 
   43 #include <machine/cpufunc.h>
   44 
   45 #define MCOUNT_DECL(s)  register_t s;
   46 #define MCOUNT_ENTER(s) s = rdpr(pil); wrpr(pil, 0, 14)
   47 #define MCOUNT_EXIT(s)  wrpr(pil, 0, s)
   48 
   49 void bintr(void);
   50 void btrap(void);
   51 void eintr(void);
   52 void user(void);
   53 
   54 #define MCOUNT_FROMPC_USER(pc)                                  \
   55         ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc)
   56 
   57 #define MCOUNT_FROMPC_INTR(pc)                                  \
   58         ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ?  \
   59             ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr :    \
   60                 (uintfptr_t)btrap) : ~0UL)
   61 
   62 void    mcount(uintfptr_t frompc, uintfptr_t selfpc);
   63 
   64 #else /* !_KERNEL */
   65 
   66 typedef u_long  uintfptr_t;
   67 
   68 #endif /* _KERNEL */
   69 
   70 #endif /* !_MACHINE_PROFILE_H_ */

Cache object: 0a61d7bc8e0dc52755ec5df8b45519b5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.