Print this page
use thread_local for ntoa buf


 666         uint_t          ul_spin_lock_spin2;
 667         uint_t          ul_spin_lock_sleep;
 668         uint_t          ul_spin_lock_wakeup;
 669         queue_root_t    ul_queue_root;  /* root of a sleep queue */
 670         id_t            ul_rtclassid;   /* real-time class id */
 671         uint_t          ul_pilocks;     /* count of PI locks held */
 672                 /* the following members *must* be last in the structure */
 673                 /* they are discarded when ulwp is replaced on thr_exit() */
 674         sigset_t        ul_sigmask;     /* thread's current signal mask */
 675         sigset_t        ul_tmpmask;     /* signal mask for sigsuspend/pollsys */
 676         siginfo_t       ul_siginfo;     /* deferred siginfo */
 677         mutex_t         ul_spinlock;    /* used when suspending/continuing */
 678         fpuenv_t        ul_fpuenv;      /* floating point state */
 679         uintptr_t       ul_sp;          /* stack pointer when blocked */
 680         void            *ul_ex_unwind;  /* address of _ex_unwind() or -1 */
 681 #if defined(sparc)
 682         void            *ul_unwind_ret; /* used only by _ex_clnup_handler() */
 683 #endif
 684         tumem_t         ul_tmem;        /* used only by umem */
 685         uint_t          ul_ptinherit;   /* pthreads sched inherit value */
 686         char            ul_ntoabuf[18]; /* thread-specific inet_ntoa buffer */
 687 } ulwp_t;
 688 
 689 #define ul_cursig       ul_cp.s.cursig          /* deferred signal number */
 690 #define ul_pleasestop   ul_cp.s.pleasestop      /* lwp requested to stop */
 691 #define ul_curplease    ul_cp.curplease         /* for testing both at once */
 692 
 693 /*
 694  * This is the size of a replacement ulwp, retained only for the benefit
 695  * of thr_join().  The trailing members are unneeded for this purpose.
 696  */
 697 #define REPLACEMENT_SIZE        ((size_t)&((ulwp_t *)NULL)->ul_sigmask)
 698 
 699 /*
 700  * Definitions for static initialization of signal sets,
 701  * plus some sneaky optimizations in various places.
 702  */
 703 
 704 #define SIGMASK(sig)    ((uint32_t)1 << (((sig) - 1) & (32 - 1)))
 705 
 706 #if (MAXSIG > (2 * 32) && MAXSIG <= (3 * 32))




 666         uint_t          ul_spin_lock_spin2;
 667         uint_t          ul_spin_lock_sleep;
 668         uint_t          ul_spin_lock_wakeup;
 669         queue_root_t    ul_queue_root;  /* root of a sleep queue */
 670         id_t            ul_rtclassid;   /* real-time class id */
 671         uint_t          ul_pilocks;     /* count of PI locks held */
 672                 /* the following members *must* be last in the structure */
 673                 /* they are discarded when ulwp is replaced on thr_exit() */
 674         sigset_t        ul_sigmask;     /* thread's current signal mask */
 675         sigset_t        ul_tmpmask;     /* signal mask for sigsuspend/pollsys */
 676         siginfo_t       ul_siginfo;     /* deferred siginfo */
 677         mutex_t         ul_spinlock;    /* used when suspending/continuing */
 678         fpuenv_t        ul_fpuenv;      /* floating point state */
 679         uintptr_t       ul_sp;          /* stack pointer when blocked */
 680         void            *ul_ex_unwind;  /* address of _ex_unwind() or -1 */
 681 #if defined(sparc)
 682         void            *ul_unwind_ret; /* used only by _ex_clnup_handler() */
 683 #endif
 684         tumem_t         ul_tmem;        /* used only by umem */
 685         uint_t          ul_ptinherit;   /* pthreads sched inherit value */

 686 } ulwp_t;
 687 
 688 #define ul_cursig       ul_cp.s.cursig          /* deferred signal number */
 689 #define ul_pleasestop   ul_cp.s.pleasestop      /* lwp requested to stop */
 690 #define ul_curplease    ul_cp.curplease         /* for testing both at once */
 691 
 692 /*
 693  * This is the size of a replacement ulwp, retained only for the benefit
 694  * of thr_join().  The trailing members are unneeded for this purpose.
 695  */
 696 #define REPLACEMENT_SIZE        ((size_t)&((ulwp_t *)NULL)->ul_sigmask)
 697 
 698 /*
 699  * Definitions for static initialization of signal sets,
 700  * plus some sneaky optimizations in various places.
 701  */
 702 
 703 #define SIGMASK(sig)    ((uint32_t)1 << (((sig) - 1) & (32 - 1)))
 704 
 705 #if (MAXSIG > (2 * 32) && MAXSIG <= (3 * 32))