Print this page
11909 THREAD_KPRI_RELEASE does nothing of the sort
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>


   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 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.

  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 #ifndef _SYS_TS_H
  32 #define _SYS_TS_H
  33 
  34 #include <sys/types.h>
  35 #include <sys/thread.h>
  36 #include <sys/cpucaps.h>
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 /*
  43  * time-sharing dispatcher parameter table entry
  44  */


  61  */
  62 typedef struct tsproc {
  63         int     ts_timeleft;    /* time remaining in procs quantum      */
  64         uint_t  ts_dispwait;    /* wall clock seconds since start       */
  65                                 /* of quantum (not reset upon preempt)  */
  66         pri_t   ts_cpupri;      /* system controlled component of ts_umdpri */
  67         pri_t   ts_uprilim;     /* user priority limit                  */
  68         pri_t   ts_upri;        /* user priority                        */
  69         pri_t   ts_umdpri;      /* user mode priority within ts class   */
  70         pri_t   ts_scpri;       /* remembered priority, for schedctl    */
  71         char    ts_nice;        /* nice value for compatibility         */
  72         char    ts_boost;       /* interactive priority offset          */
  73         uchar_t ts_flags;       /* flags defined below                  */
  74         kthread_t *ts_tp;       /* pointer to thread                    */
  75         struct tsproc *ts_next; /* link to next tsproc on list          */
  76         struct tsproc *ts_prev; /* link to previous tsproc on list      */
  77         caps_sc_t ts_caps;      /* CPU caps specific data               */
  78 } tsproc_t;
  79 
  80 /* flags */
  81 #define TSKPRI          0x01    /* thread at kernel mode priority       */

  82 #define TSBACKQ         0x02    /* thread goes to back of dispq if preempted */
  83 #define TSIA            0x04    /* thread is interactive                */
  84 #define TSIASET         0x08    /* interactive thread is "on"           */
  85 #define TSIANICED       0x10    /* interactive thread has been niced    */
  86 #define TSRESTORE       0x20    /* thread was not preempted, due to schedctl */
  87                                 /* restore priority from ts_scpri       */
  88 
  89 #endif /* _KERNEL */
  90 
  91 #ifdef  __cplusplus
  92 }
  93 #endif
  94 
  95 #endif  /* _SYS_TS_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 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright 2019 Joyent, Inc.
  26  */
  27 
  28 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  29 /*        All Rights Reserved   */
  30 
  31 
  32 #ifndef _SYS_TS_H
  33 #define _SYS_TS_H
  34 
  35 #include <sys/types.h>
  36 #include <sys/thread.h>
  37 #include <sys/cpucaps.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * time-sharing dispatcher parameter table entry
  45  */


  62  */
  63 typedef struct tsproc {
  64         int     ts_timeleft;    /* time remaining in procs quantum      */
  65         uint_t  ts_dispwait;    /* wall clock seconds since start       */
  66                                 /* of quantum (not reset upon preempt)  */
  67         pri_t   ts_cpupri;      /* system controlled component of ts_umdpri */
  68         pri_t   ts_uprilim;     /* user priority limit                  */
  69         pri_t   ts_upri;        /* user priority                        */
  70         pri_t   ts_umdpri;      /* user mode priority within ts class   */
  71         pri_t   ts_scpri;       /* remembered priority, for schedctl    */
  72         char    ts_nice;        /* nice value for compatibility         */
  73         char    ts_boost;       /* interactive priority offset          */
  74         uchar_t ts_flags;       /* flags defined below                  */
  75         kthread_t *ts_tp;       /* pointer to thread                    */
  76         struct tsproc *ts_next; /* link to next tsproc on list          */
  77         struct tsproc *ts_prev; /* link to previous tsproc on list      */
  78         caps_sc_t ts_caps;      /* CPU caps specific data               */
  79 } tsproc_t;
  80 
  81 /* flags */
  82 
  83 /* Formerly: TSKPRI     0x01 - thread at kernel mode priority */
  84 #define TSBACKQ         0x02    /* thread goes to back of dispq if preempted */
  85 #define TSIA            0x04    /* thread is interactive                */
  86 #define TSIASET         0x08    /* interactive thread is "on"           */
  87 #define TSIANICED       0x10    /* interactive thread has been niced    */
  88 #define TSRESTORE       0x20    /* thread was not preempted, due to schedctl */
  89                                 /* restore priority from ts_scpri       */
  90 
  91 #endif /* _KERNEL */
  92 
  93 #ifdef  __cplusplus
  94 }
  95 #endif
  96 
  97 #endif  /* _SYS_TS_H */