5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   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 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  28  */
  29 
  30 #ifndef _SYS_KLWP_H
  31 #define _SYS_KLWP_H
  32 
  33 #include <sys/types.h>
  34 #include <sys/condvar.h>
  35 #include <sys/thread.h>
  36 #include <sys/signal.h>
  37 #include <sys/siginfo.h>
  38 #include <sys/pcb.h>
  39 #include <sys/time.h>
  40 #include <sys/msacct.h>
  41 #include <sys/ucontext.h>
  42 #include <sys/lwp.h>
  43 #include <sys/contract.h>
  44 
 
 
 183         size_t lwp_childstksz;  /* kernel stksize for this lwp's descendants */
 184 
 185         uintptr_t       lwp_ustack;             /* current stack bounds */
 186         size_t          lwp_old_stk_ctl;        /* old stack limit */
 187 
 188         /*
 189          * Contracts
 190          */
 191         struct ct_template *lwp_ct_active[CTT_MAXTYPE]; /* active templates */
 192         struct contract *lwp_ct_latest[CTT_MAXTYPE]; /* last created contract */
 193 
 194         void    *lwp_brand;             /* per-lwp brand data */
 195         struct psinfo *lwp_spymaster;   /* if an agent LWP, our spymaster */
 196 } klwp_t;
 197 
 198 /* lwp states */
 199 #define LWP_USER        0x01            /* Running in user mode */
 200 #define LWP_SYS         0x02            /* Running in kernel mode */
 201 
 202 #if     defined(_KERNEL)
 203 extern  int     lwp_default_stksize;
 204 extern  int     lwp_reapcnt;
 205 
 206 extern  struct _kthread *lwp_deathrow;
 207 extern  kmutex_t        reaplock;
 208 extern  struct kmem_cache *lwp_cache;
 209 extern  void            *segkp_lwp;
 210 extern  klwp_t          lwp0;
 211 
 212 /* where newly-created lwps normally start */
 213 extern  void    lwp_rtt(void);
 214 
 215 #endif  /* _KERNEL */
 216 
 217 #ifdef  __cplusplus
 218 }
 219 #endif
 220 
 221 #endif  /* _SYS_KLWP_H */
  | 
 
 
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   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 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 /*
  26  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  27  */
  28 
  29 /*
  30  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  31  */
  32 
  33 #ifndef _SYS_KLWP_H
  34 #define _SYS_KLWP_H
  35 
  36 #include <sys/types.h>
  37 #include <sys/condvar.h>
  38 #include <sys/thread.h>
  39 #include <sys/signal.h>
  40 #include <sys/siginfo.h>
  41 #include <sys/pcb.h>
  42 #include <sys/time.h>
  43 #include <sys/msacct.h>
  44 #include <sys/ucontext.h>
  45 #include <sys/lwp.h>
  46 #include <sys/contract.h>
  47 
 
 
 186         size_t lwp_childstksz;  /* kernel stksize for this lwp's descendants */
 187 
 188         uintptr_t       lwp_ustack;             /* current stack bounds */
 189         size_t          lwp_old_stk_ctl;        /* old stack limit */
 190 
 191         /*
 192          * Contracts
 193          */
 194         struct ct_template *lwp_ct_active[CTT_MAXTYPE]; /* active templates */
 195         struct contract *lwp_ct_latest[CTT_MAXTYPE]; /* last created contract */
 196 
 197         void    *lwp_brand;             /* per-lwp brand data */
 198         struct psinfo *lwp_spymaster;   /* if an agent LWP, our spymaster */
 199 } klwp_t;
 200 
 201 /* lwp states */
 202 #define LWP_USER        0x01            /* Running in user mode */
 203 #define LWP_SYS         0x02            /* Running in kernel mode */
 204 
 205 #if     defined(_KERNEL)
 206 extern  volatile int    lwp_default_stksize;
 207 extern  int     lwp_reapcnt;
 208 
 209 extern  struct _kthread *lwp_deathrow;
 210 extern  kmutex_t        reaplock;
 211 extern  struct kmem_cache *lwp_cache;
 212 extern  void            *segkp_lwp;
 213 extern  klwp_t          lwp0;
 214 
 215 /* where newly-created lwps normally start */
 216 extern  void    lwp_rtt(void);
 217 
 218 #endif  /* _KERNEL */
 219 
 220 #ifdef  __cplusplus
 221 }
 222 #endif
 223 
 224 #endif  /* _SYS_KLWP_H */
  |