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

Cache object: a120b6ac4bc9fde2a1c498f20a71bcd9


[ 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.