Source-Changes-HG archive

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

[src/trunk]: src/libexec/ld.elf_so Add some clarifications



details:   https://anonhg.NetBSD.org/src/rev/ab1e026bed38
branches:  trunk
changeset: 763133:ab1e026bed38
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Mar 10 17:38:30 2011 +0000

description:
Add some clarifications

diffstat:

 libexec/ld.elf_so/README.TLS |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r f553556a51b4 -r ab1e026bed38 libexec/ld.elf_so/README.TLS
--- a/libexec/ld.elf_so/README.TLS      Thu Mar 10 17:22:51 2011 +0000
+++ b/libexec/ld.elf_so/README.TLS      Thu Mar 10 17:38:30 2011 +0000
@@ -13,8 +13,13 @@
 ucontext_t, so the second option is possibly required.
 
 (3) _lwp_setprivate(2) has to update the same register as
-_lwp_makecontext. cpu_lwp_setprivate has to call _lwp_setprivate(2) to
-reflect the kernel view. cpu_switch has to update the mapping.
+_lwp_makecontext uses for the private area pointer. Normally
+cpu_lwp_setprivate is provided by MD to reflect the kernel view and
+enabled by defining __HAVE_CPU_LWP_SETPRIVATE in machine/types.h.
+cpu_setmcontext is responsible for keeping the MI l_private field
+synchronised by calling lwp_setprivate as needed.
+
+cpu_switchto has to update the mapping.
 
 _lwp_setprivate is used for the initial thread, all other threads
 created by libpthread use _lwp_makecontext for this purpose.
@@ -24,7 +29,8 @@
 only i386), also add a weak reference to 0 in src/lib/libc/tls/tls.c.
 
 The generic implementation can be found in tls.c and is used with
-__HAVE_COMMON___TLS_GET_ADDR. It depends on ___lwp_getprivate_fast.
+__HAVE_COMMON___TLS_GET_ADDR. It depends on ___lwp_getprivate_fast
+(see below).
 
 (5) Implement the necessary relocation records in mdreloc.c.  There are
 typically three relocation types found in dynamic binaries:



Home | Main Index | Thread Index | Old Index