svn commit: r232441 - projects/armv6/sys/arm/arm
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Mar 3 06:38:08 UTC 2012
Author: gonzo
Date: Sat Mar 3 06:38:07 2012
New Revision: 232441
URL: http://svn.freebsd.org/changeset/base/232441
Log:
Use proper TLS location if td == curthread
Modified:
projects/armv6/sys/arm/arm/sys_machdep.c
Modified: projects/armv6/sys/arm/arm/sys_machdep.c
==============================================================================
--- projects/armv6/sys/arm/arm/sys_machdep.c Sat Mar 3 06:23:26 2012 (r232440)
+++ projects/armv6/sys/arm/arm/sys_machdep.c Sat Mar 3 06:38:07 2012 (r232441)
@@ -88,7 +88,11 @@ static int
arm32_set_tp(struct thread *td, void *args)
{
- td->td_md.md_tp = (register_t)args;
+ if (td != curthread)
+ td->td_md.md_tp = (register_t)args;
+ else
+ /* XXX: wrong for SMP case */
+ *(register_t *)ARM_TP_ADDRESS = (register_t)args;
return (0);
}
@@ -96,7 +100,11 @@ static int
arm32_get_tp(struct thread *td, void *args)
{
- td->td_retval[0] = td->td_md.md_tp;
+ if (td != curthread)
+ td->td_retval[0] = td->td_md.md_tp;
+ else
+ /* XXX: wrong for SMP case */
+ td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS;
return (0);
}
More information about the svn-src-projects
mailing list