home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / ts.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.2 KB  |  59 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_TS_H
  11. #define _SYS_TS_H
  12.  
  13. #ident    "@(#)/usr/include/sys/ts.h.sl 1.1 4.0 12/08/90 31970 AT&T-USL"
  14. /*
  15.  * time-sharing dispatcher parameter table entry
  16.  */
  17. typedef struct tsdpent {
  18.     int    ts_globpri;    /* global (class independent) priority */
  19.     long    ts_quantum;    /* time quantum given to procs at this level */
  20.     short    ts_tqexp;    /* ts_umdpri assigned when proc at this level */
  21.                 /*   exceeds its time quantum */
  22.     short    ts_slpret;    /* ts_umdpri assigned when proc at this level */
  23.                 /*  returns to user mode after sleeping */
  24.     short    ts_maxwait;    /* bumped to ts_lwait if more than ts_maxwait */
  25.                 /*  secs elapse before receiving full quantum */
  26.     short    ts_lwait;    /* ts_umdpri assigned if ts_dispwait exceeds  */
  27.                 /*  ts_maxwait */                
  28. } tsdpent_t;
  29.  
  30.  
  31. /*
  32.  * time-sharing class specific proc structure
  33.  */
  34. typedef struct tsproc {
  35.     long    ts_timeleft;    /* time remaining in procs quantum */
  36.     short    ts_cpupri;    /* system controlled component of ts_umdpri */
  37.     short    ts_uprilim;    /* user priority limit */
  38.     short    ts_upri;    /* user priority */
  39.     short    ts_umdpri;    /* user mode priority within ts class */
  40.     char    ts_nice;    /* nice value for compatibility */
  41.     unsigned char ts_flags;    /* flags defined below */
  42.     short    ts_dispwait;    /* number of wall clock seconds since start */
  43.                 /*   of quantum (not reset upon preemption) */
  44.     struct proc *ts_procp;    /* pointer to proc table entry */
  45.     char    *ts_pstatp;    /* pointer to p_stat */
  46.     int    *ts_pprip;    /* pointer to p_pri */
  47.     uint    *ts_pflagp;    /* pointer to p_flag */
  48.     struct tsproc *ts_next;    /* link to next tsproc on list */
  49.     struct tsproc *ts_prev;    /* link to previous tsproc on list */
  50. } tsproc_t;
  51.  
  52.  
  53. /* flags */
  54. #define    TSKPRI    0x01        /* proc at kernel mode priority */
  55. #define    TSBACKQ    0x02        /* proc goes to back of disp q when preempted */
  56. #define    TSFORK    0x04        /* proc has forked, so don't reset full quantum */
  57.  
  58. #endif    /* _SYS_TS_H */
  59.