843 mpcb->mpcb_wbuf = kmem_cache_alloc(wbuf32_cache, KM_SLEEP);
844 mpcb->mpcb_wstate = WSTATE_USER32;
845 }
846 mpcb->mpcb_pa = va_to_pa(mpcb);
847 mpcb->mpcb_wbuf_pa = va_to_pa(mpcb->mpcb_wbuf);
848
849 /*
850 * Here we initialize minimal fpu state.
851 * The rest is done at the first floating
852 * point instruction that a process executes
853 * or by the lib_psr memcpy routines.
854 */
855 if (fpu_exists) {
856 extern void _fp_write_fprs(unsigned);
857 _fp_write_fprs(0);
858 }
859 fpp->fpu_en = 0;
860 fpp->fpu_fprs = 0;
861 }
862
863 void
864 lwp_swapin(kthread_t *tp)
865 {
866 struct machpcb *mpcb = lwptompcb(ttolwp(tp));
867
868 mpcb->mpcb_pa = va_to_pa(mpcb);
869 mpcb->mpcb_wbuf_pa = va_to_pa(mpcb->mpcb_wbuf);
870 }
871
872 /*
873 * Construct the execution environment for the user's signal
874 * handler and arrange for control to be given to it on return
875 * to userland. The library code now calls setcontext() to
876 * clean up after the signal handler, so sigret() is no longer
877 * needed.
878 */
879 int
880 sendsig(int sig, k_siginfo_t *sip, void (*hdlr)())
881 {
882 /*
883 * 'volatile' is needed to ensure that values are
884 * correct on the error return from on_fault().
885 */
886 volatile int minstacksz; /* min stack required to catch signal */
887 int newstack = 0; /* if true, switching to altstack */
888 label_t ljb;
889 caddr_t sp;
890 struct regs *volatile rp;
891 klwp_t *lwp = ttolwp(curthread);
|
843 mpcb->mpcb_wbuf = kmem_cache_alloc(wbuf32_cache, KM_SLEEP);
844 mpcb->mpcb_wstate = WSTATE_USER32;
845 }
846 mpcb->mpcb_pa = va_to_pa(mpcb);
847 mpcb->mpcb_wbuf_pa = va_to_pa(mpcb->mpcb_wbuf);
848
849 /*
850 * Here we initialize minimal fpu state.
851 * The rest is done at the first floating
852 * point instruction that a process executes
853 * or by the lib_psr memcpy routines.
854 */
855 if (fpu_exists) {
856 extern void _fp_write_fprs(unsigned);
857 _fp_write_fprs(0);
858 }
859 fpp->fpu_en = 0;
860 fpp->fpu_fprs = 0;
861 }
862
863 /*
864 * Construct the execution environment for the user's signal
865 * handler and arrange for control to be given to it on return
866 * to userland. The library code now calls setcontext() to
867 * clean up after the signal handler, so sigret() is no longer
868 * needed.
869 */
870 int
871 sendsig(int sig, k_siginfo_t *sip, void (*hdlr)())
872 {
873 /*
874 * 'volatile' is needed to ensure that values are
875 * correct on the error return from on_fault().
876 */
877 volatile int minstacksz; /* min stack required to catch signal */
878 int newstack = 0; /* if true, switching to altstack */
879 label_t ljb;
880 caddr_t sp;
881 struct regs *volatile rp;
882 klwp_t *lwp = ttolwp(curthread);
|