Print this page
remove support for non-ANSI compilation


   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  *      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  23  *        All Rights Reserved
  24  *
  25  */
  26 
  27 /*


  28  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  29  * Use is subject to license terms.
  30  */
  31 
  32 #ifndef _SYS_PROCESSOR_H
  33 #define _SYS_PROCESSOR_H
  34 
  35 #include <sys/types.h>
  36 #include <sys/procset.h>
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 /*
  43  * Definitions for p_online, processor_info & lgrp system calls.
  44  */
  45 
  46 /*
  47  * Type for an lgrpid


  95 typedef struct {
  96         int     pi_state;                       /* processor state, see above */
  97         char    pi_processor_type[PI_TYPELEN];  /* ASCII CPU type */
  98         char    pi_fputypes[PI_FPUTYPE];        /* ASCII FPU types */
  99         int     pi_clock;                       /* CPU clock freq in MHz */
 100 } processor_info_t;
 101 
 102 /*
 103  * Binding values for processor_bind(2)
 104  */
 105 #define PBIND_NONE      -1      /* LWP/thread is not bound */
 106 #define PBIND_QUERY     -2      /* don't set, just return the binding */
 107 #define PBIND_HARD      -3      /* prevents offlining CPU (default) */
 108 #define PBIND_SOFT      -4      /* allows offlining CPU */
 109 #define PBIND_QUERY_TYPE        -5      /* Return binding type */
 110 
 111 /*
 112  * User-level system call interface prototypes
 113  */
 114 #ifndef _KERNEL
 115 #ifdef __STDC__
 116 
 117 extern int      p_online(processorid_t processorid, int flag);
 118 extern int      processor_info(processorid_t processorid,
 119                     processor_info_t *infop);
 120 extern int      processor_bind(idtype_t idtype, id_t id,
 121                     processorid_t processorid, processorid_t *obind);
 122 extern processorid_t getcpuid(void);
 123 extern lgrpid_t gethomelgroup(void);
 124 
 125 #else
 126 
 127 extern int      p_online();
 128 extern int      processor_info();
 129 extern int      processor_bind();
 130 extern processorid_t getcpuid();
 131 extern lgrpid_t gethomelgroup();
 132 
 133 #endif /* __STDC__ */
 134 
 135 #else   /* _KERNEL */
 136 
 137 /*
 138  * Internal interface prototypes
 139  */
 140 extern int      p_online_internal(processorid_t, int, int *);
 141 extern int      p_online_internal_locked(processorid_t, int, int *);
 142 
 143 #endif /* !_KERNEL */
 144 
 145 #ifdef __cplusplus
 146 }
 147 #endif
 148 
 149 #endif  /* _SYS_PROCESSOR_H */


   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  *      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  23  *        All Rights Reserved
  24  *
  25  */
  26 
  27 /*
  28  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  29  *
  30  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  31  * Use is subject to license terms.
  32  */
  33 
  34 #ifndef _SYS_PROCESSOR_H
  35 #define _SYS_PROCESSOR_H
  36 
  37 #include <sys/types.h>
  38 #include <sys/procset.h>
  39 
  40 #ifdef  __cplusplus
  41 extern "C" {
  42 #endif
  43 
  44 /*
  45  * Definitions for p_online, processor_info & lgrp system calls.
  46  */
  47 
  48 /*
  49  * Type for an lgrpid


  97 typedef struct {
  98         int     pi_state;                       /* processor state, see above */
  99         char    pi_processor_type[PI_TYPELEN];  /* ASCII CPU type */
 100         char    pi_fputypes[PI_FPUTYPE];        /* ASCII FPU types */
 101         int     pi_clock;                       /* CPU clock freq in MHz */
 102 } processor_info_t;
 103 
 104 /*
 105  * Binding values for processor_bind(2)
 106  */
 107 #define PBIND_NONE      -1      /* LWP/thread is not bound */
 108 #define PBIND_QUERY     -2      /* don't set, just return the binding */
 109 #define PBIND_HARD      -3      /* prevents offlining CPU (default) */
 110 #define PBIND_SOFT      -4      /* allows offlining CPU */
 111 #define PBIND_QUERY_TYPE        -5      /* Return binding type */
 112 
 113 /*
 114  * User-level system call interface prototypes
 115  */
 116 #ifndef _KERNEL

 117 
 118 extern int      p_online(processorid_t processorid, int flag);
 119 extern int      processor_info(processorid_t processorid,
 120                     processor_info_t *infop);
 121 extern int      processor_bind(idtype_t idtype, id_t id,
 122                     processorid_t processorid, processorid_t *obind);
 123 extern processorid_t getcpuid(void);
 124 extern lgrpid_t gethomelgroup(void);
 125 










 126 #else   /* _KERNEL */
 127 
 128 /*
 129  * Internal interface prototypes
 130  */
 131 extern int      p_online_internal(processorid_t, int, int *);
 132 extern int      p_online_internal_locked(processorid_t, int, int *);
 133 
 134 #endif /* !_KERNEL */
 135 
 136 #ifdef __cplusplus
 137 }
 138 #endif
 139 
 140 #endif  /* _SYS_PROCESSOR_H */