Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/powerpc/gen Turn on _UC_TLSBASE for sure in th...



details:   https://anonhg.NetBSD.org/src/rev/be10e80201ef
branches:  trunk
changeset: 935003:be10e80201ef
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Jun 22 06:49:04 2020 +0000

description:
Turn on _UC_TLSBASE for sure in the same manner as other ports.
No functional changes since that flag is turned on via getcontext(2).

diffstat:

 lib/libc/arch/powerpc/gen/_lwp.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6c985ec93519 -r be10e80201ef lib/libc/arch/powerpc/gen/_lwp.c
--- a/lib/libc/arch/powerpc/gen/_lwp.c  Mon Jun 22 05:34:57 2020 +0000
+++ b/lib/libc/arch/powerpc/gen/_lwp.c  Mon Jun 22 06:49:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _lwp.c,v 1.7 2012/03/22 05:36:50 matt Exp $    */
+/*     $NetBSD: _lwp.c,v 1.8 2020/06/22 06:49:04 rin Exp $     */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _lwp.c,v 1.7 2012/03/22 05:36:50 matt Exp $");
+__RCSID("$NetBSD: _lwp.c,v 1.8 2020/06/22 06:49:04 rin Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -67,6 +67,8 @@
        u->uc_mcontext.__gregs[1] = sp;                         /* stack */
        u->uc_mcontext.__gregs[33] = (uintptr_t) _lwp_exit;     /* LR */
        u->uc_mcontext.__gregs[34] = (uintptr_t) start;         /* PC */
+
        u->uc_mcontext.__gregs[_REG_R2] =
            (uintptr_t)tcb + TLS_TP_OFFSET + sizeof(struct tls_tcb);
+       u->uc_flags |= _UC_TLSBASE;
 }



Home | Main Index | Thread Index | Old Index