Date: Sat, 6 Nov 2004 00:37:53 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 64394 for review Message-ID: <200411060037.iA60brbb043659@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=64394 Change 64394 by peter@peter_daintree on 2004/11/06 00:37:41 invade libthr Affected files ... .. //depot/projects/hammer/lib/libthr/arch/i386/i386/_setcurthread.c#14 edit Differences ... ==== //depot/projects/hammer/lib/libthr/arch/i386/i386/_setcurthread.c#14 (text+ko) ==== @@ -62,14 +62,21 @@ void * _set_curthread(ucontext_t *uc, struct pthread *thr, int *err) { +#ifndef COMPAT_32BIT union descriptor desc; +#endif struct tcb *tcb; void *oldtls; +#ifndef COMPAT_32BIT int ldt_index; +#endif *err = 0; if (uc == NULL && thr->arch_id != NULL) { +#ifndef COMPAT_32BIT + _amd64_set_gsbase(thr->arch_id); +#endif return (thr->arch_id); } @@ -91,6 +98,7 @@ */ tcb->tcb_thread = thr; +#ifndef COMPAT_32BIT bzero(&desc, sizeof(desc)); /* @@ -119,6 +127,10 @@ uc->uc_mcontext.mc_gs = LSEL(ldt_index, SEL_UPL); else _set_gs(LSEL(ldt_index, SEL_UPL)); +#else + if (uc == NULL) + _amd64_set_gsbase(tcb); +#endif return (tcb); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411060037.iA60brbb043659>