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>

@@ -201,11 +201,10 @@
         ushort_t        t_oldspl;       /* spl level before dispatcher locked */
         volatile char   t_pre_sys;      /* pre-syscall work needed */
         lock_t          t_lock_flush;   /* for lock_mutex_flush() impl */
         struct _disp    *t_disp_queue;  /* run queue for chosen CPU */
         clock_t         t_disp_time;    /* last time this thread was running */
-        uint_t          t_kpri_req;     /* kernel priority required */
 
         /*
          * Post-syscall / post-trap flags.
          *      No lock is required to set these.
          *      These must be cleared only by the thread itself.

@@ -606,24 +605,10 @@
 #endif  /* _KERNEL */
 
 #define THREAD_NAME_MAX 32      /* includes terminating NUL */
 
 /*
- * Macros to indicate that the thread holds resources that could be critical
- * to other kernel threads, so this thread needs to have kernel priority
- * if it blocks or is preempted.  Note that this is not necessary if the
- * resource is a mutex or a writer lock because of priority inheritance.
- *
- * The only way one thread may legally manipulate another thread's t_kpri_req
- * is to hold the target thread's thread lock while that thread is asleep.
- * (The rwlock code does this to implement direct handoff to waiting readers.)
- */
-#define THREAD_KPRI_REQUEST()   (curthread->t_kpri_req++)
-#define THREAD_KPRI_RELEASE()   (curthread->t_kpri_req--)
-#define THREAD_KPRI_RELEASE_N(n) (curthread->t_kpri_req -= (n))
-
-/*
  * Macro to change a thread's priority.
  */
 #define THREAD_CHANGE_PRI(t, pri) {                                     \
         pri_t __new_pri = (pri);                                        \
         DTRACE_SCHED2(change__pri, kthread_t *, (t), pri_t, __new_pri); \