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/sys/cpu_data.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 /*      $NetBSD: cpu_data.h,v 1.3 2004/10/26 00:14:46 yamt Exp $        */
    2 
    3 /*-
    4  * Copyright (c) 2004 The NetBSD Foundation, Inc.
    5  * All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. All advertising materials mentioning features or use of this software
   16  *    must display the following acknowledgement:
   17  *        This product includes software developed by the NetBSD
   18  *        Foundation, Inc. and its contributors.
   19  * 4. Neither the name of The NetBSD Foundation nor the names of its
   20  *    contributors may be used to endorse or promote products derived
   21  *    from this software without specific prior written permission.
   22  *
   23  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   24  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   25  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   26  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   27  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   33  * POSSIBILITY OF SUCH DAMAGE.
   34  */
   35 
   36 /*
   37  * based on arch/i386/include/cpu.h:
   38  *      NetBSD: cpu.h,v 1.115 2004/05/16 12:32:53 yamt Exp
   39  */
   40 
   41 #ifndef _CPU_DATA_H_
   42 #define _CPU_DATA_H_
   43 
   44 #if defined(_KERNEL_OPT)
   45 #include "opt_multiprocessor.h"
   46 #endif
   47 
   48 struct lwp;
   49 #include <sys/sched.h>  /* for schedstate_percpu */
   50 
   51 /*
   52  * MI per-cpu data
   53  *
   54  * this structure is intended to be included in MD cpu_info structure.
   55  *      struct cpu_info {
   56  *              struct cpu_data ci_data;
   57  *      }
   58  *
   59  * note that cpu_data is not expected to contain much data,
   60  * as cpu_info is size-limited on most ports.
   61  */
   62 
   63 struct cpu_data {
   64         struct schedstate_percpu cpu_schedstate; /* scheduler state */
   65 
   66 #if defined(MULTIPROCESSOR)
   67         int cpu_biglock_count;
   68 #endif /* defined(MULTIPROCESSOR) */
   69         /*
   70          * for LOCKDEBUG
   71          */
   72 #if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
   73         u_long cpu_spin_locks;          /* # of spin locks held */
   74         u_long cpu_simple_locks;        /* # of simple locks held */
   75 #endif /* defined(DIAGNOSTIC) || defined(LOCKDEBUG) */
   76 };
   77 
   78 /* compat definitions */
   79 #define ci_schedstate   ci_data.cpu_schedstate
   80 #if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
   81 #define ci_spin_locks   ci_data.cpu_spin_locks
   82 #define ci_simple_locks ci_data.cpu_simple_locks
   83 #endif /* defined(DIAGNOSTIC) || defined(LOCKDEBUG) */
   84 
   85 #endif /* _CPU_DATA_H_ */

Cache object: 600a2b5f4325a06b14f6cbdcd82d3d4e


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