cvs commit: src/lib/libthr/arch/alpha/alpha _curthread.c
Marcel Moolenaar
marcel at xcllnt.net
Thu Jul 24 12:19:53 PDT 2003
On Thu, Jul 24, 2003 at 03:08:32PM -0400, John Baldwin wrote:
>
> On 24-Jul-2003 Marcel Moolenaar wrote:
> > marcel 2003/07/24 00:51:49 PDT
> >
> > FreeBSD src repository
> >
> > Modified files:
> > lib/libthr/arch/alpha/alpha _curthread.c
> > Log:
> > Implement _get_curthread and _set_curthread. We use GCCs builtin
> > function this, which expands to PAL calls (rduniq and wruniq).
> > This needs adjustment when TLS is implemented.
>
> This trashes SMP since we use the per-CPU unique value already
> to maintain the per-cpu data pointer.
Writing to the per-CPU unique value is an unprivileged operation.
You cannot possibly use that for in-kernel use without saving and
restoring it on kernel exit/entry. Which is what needs to be done.
--
Marcel Moolenaar USPA: A-39004 marcel at xcllnt.net
More information about the cvs-src
mailing list