Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/thread.h
          +++ new/usr/src/uts/common/sys/thread.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -/*
  28      - * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
  29      - */
  30      -
  31   27  #ifndef _SYS_THREAD_H
  32   28  #define _SYS_THREAD_H
  33   29  
  34   30  
  35   31  #include <sys/types.h>
  36   32  #include <sys/t_lock.h>
  37   33  #include <sys/klwp.h>
  38   34  #include <sys/time.h>
  39   35  #include <sys/signal.h>
  40   36  #include <sys/kcpc.h>
↓ open down ↓ 24 lines elided ↑ open up ↑
  65   61  
  66   62  typedef struct ctxop {
  67   63          void    (*save_op)(void *);     /* function to invoke to save context */
  68   64          void    (*restore_op)(void *);  /* function to invoke to restore ctx */
  69   65          void    (*fork_op)(void *, void *);     /* invoke to fork context */
  70   66          void    (*lwp_create_op)(void *, void *);       /* lwp_create context */
  71   67          void    (*exit_op)(void *);     /* invoked during {thread,lwp}_exit() */
  72   68          void    (*free_op)(void *, int); /* function which frees the context */
  73   69          void    *arg;           /* argument to above functions, ctx pointer */
  74   70          struct ctxop *next;     /* next context ops */
  75      -        hrtime_t save_ts;               /* timestamp of last save */
  76      -        hrtime_t restore_ts;            /* timestamp of last restore */
  77   71  } ctxop_t;
  78   72  
  79   73  /*
  80   74   * The active file descriptor table.
  81   75   * Each member of a_fd[] not equalling -1 represents an active fd.
  82   76   * The structure is initialized on first use; all zeros means uninitialized.
  83   77   */
  84   78  typedef struct {
  85   79          kmutex_t a_fdlock;      /* protects a_fd and a_nfd */
  86   80          int     *a_fd;          /* pointer to list of fds */
↓ open down ↓ 278 lines elided ↑ open up ↑
 365  359   *              T_WAKEABLE
 366  360   */
 367  361  #define T_INTR_THREAD   0x0001  /* thread is an interrupt thread */
 368  362  #define T_WAKEABLE      0x0002  /* thread is blocked, signals enabled */
 369  363  #define T_TOMASK        0x0004  /* use lwp_sigoldmask on return from signal */
 370  364  #define T_TALLOCSTK     0x0008  /* thread structure allocated from stk */
 371  365  #define T_FORKALL       0x0010  /* thread was cloned by forkall() */
 372  366  #define T_WOULDBLOCK    0x0020  /* for lockfs */
 373  367  #define T_DONTBLOCK     0x0040  /* for lockfs */
 374  368  #define T_DONTPEND      0x0080  /* for lockfs */
 375      -#define T_SPLITSTK      0x0100  /* kernel stack is currently split */
      369 +#define T_SYS_PROF      0x0100  /* profiling on for duration of system call */
 376  370  #define T_WAITCVSEM     0x0200  /* waiting for a lwp_cv or lwp_sema on sleepq */
 377  371  #define T_WATCHPT       0x0400  /* thread undergoing a watchpoint emulation */
 378  372  #define T_PANIC         0x0800  /* thread initiated a system panic */
 379  373  #define T_LWPREUSE      0x1000  /* stack and LWP can be reused */
 380  374  #define T_CAPTURING     0x2000  /* thread is in page capture logic */
 381  375  #define T_VFPARENT      0x4000  /* thread is vfork parent, must call vfwait */
 382  376  #define T_DONTDTRACE    0x8000  /* disable DTrace probes */
 383  377  
 384  378  /*
 385  379   * Flags in t_proc_flag.
↓ open down ↓ 208 lines elided ↑ open up ↑
 594  588  #define thread_unlock_nopreempt(t)      disp_lock_exit_nopreempt((t)->t_lockp)
 595  589  
 596  590  #define THREAD_LOCK_HELD(t)     (DISP_LOCK_HELD((t)->t_lockp))
 597  591  
 598  592  extern disp_lock_t transition_lock;     /* lock protecting transiting threads */
 599  593  extern disp_lock_t stop_lock;           /* lock protecting stopped threads */
 600  594  
 601  595  caddr_t thread_stk_init(caddr_t);       /* init thread stack */
 602  596  
 603  597  extern int default_binding_mode;
 604      -extern int default_stksize;
 605  598  
 606  599  #endif  /* _KERNEL */
 607  600  
 608  601  /*
 609  602   * Macros to indicate that the thread holds resources that could be critical
 610  603   * to other kernel threads, so this thread needs to have kernel priority
 611  604   * if it blocks or is preempted.  Note that this is not necessary if the
 612  605   * resource is a mutex or a writer lock because of priority inheritance.
 613  606   *
 614  607   * The only way one thread may legally manipulate another thread's t_kpri_req
↓ open down ↓ 121 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX