]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename VGOFF_(tls) to VGOFF_(tls_ptr) to make it clear it's not the same as
authorNicholas Nethercote <n.nethercote@gmail.com>
Wed, 18 Aug 2004 23:11:45 +0000 (23:11 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Wed, 18 Aug 2004 23:11:45 +0000 (23:11 +0000)
ThreadState.tls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2593

coregrind/vg_include.h
coregrind/vg_ldt.c
coregrind/vg_main.c
coregrind/vg_scheduler.c

index f19a1ace95d2db8d635da1d128e3523831597866..7bd817f394b3522d44535f9036f05b577c237b98 100644 (file)
@@ -1614,7 +1614,7 @@ extern Int VGOFF_(sh_eflags);
 extern Int VGOFF_(ldt);
 
 /* This thread's TLS pointer. */
-extern Int VGOFF_(tls);
+extern Int VGOFF_(tls_ptr);
 
 /* Nb: Most helper offsets are in include/vg_skin.h, for use by tools */
 
index 4af6f1109560b5024213fb88482c5c84fb0602bd..ba9b245bfe8305ea00b0e0a824c125837336e23e 100644 (file)
@@ -200,7 +200,7 @@ Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr )
 
       /* Come up with a suitable GDT entry.  We look at the thread's TLS
         array, which is pointed to by a VG_(baseBlock) entry. */
-      the_tls = (VgLdtEntry*)VG_(baseBlock)[VGOFF_(tls)];
+      the_tls = (VgLdtEntry*)VG_(baseBlock)[VGOFF_(tls_ptr)];
       base = (Addr)wine_ldt_get_base ( &the_tls[seg_selector-VKI_GDT_TLS_MIN] );
       limit = (UInt)wine_ldt_get_limit ( &the_tls[seg_selector-VKI_GDT_TLS_MIN] );
    } else {
index f80a75bca37880b95917c7959703fef6d0703ce1..a0f96932de14e0fb5aa9353ad7d8c2a4e28045e7 100644 (file)
@@ -2103,7 +2103,7 @@ Int VGOFF_(m_eflags) = INVALID_OFFSET;
 Int VGOFF_(m_dflag)  = INVALID_OFFSET;
 Int VGOFF_(m_ssestate) = INVALID_OFFSET;
 Int VGOFF_(ldt)   = INVALID_OFFSET;
-Int VGOFF_(tls)   = INVALID_OFFSET;
+Int VGOFF_(tls_ptr) = INVALID_OFFSET;
 Int VGOFF_(m_cs)  = INVALID_OFFSET;
 Int VGOFF_(m_ss)  = INVALID_OFFSET;
 Int VGOFF_(m_ds)  = INVALID_OFFSET;
@@ -2374,7 +2374,7 @@ static void init_baseBlock ( Addr client_eip, Addr esp_at_startup )
    VGOFF_(ldt)   = alloc_BaB_1_set((UInt)NULL);
 
    /* TLS pointer: pretend the root thread has no TLS array for now. */
-   VGOFF_(tls)   = alloc_BaB_1_set((UInt)NULL);
+   VGOFF_(tls_ptr) = alloc_BaB_1_set((UInt)NULL);
 
    /* segment registers */
    VGOFF_(m_cs)  = alloc_BaB_1_set(0);
index 94adac15d29e05d22c2f139d06b65e2d5ff86ef0..fbe80dd0dc9e89e0f276b958f400813349ec16da 100644 (file)
@@ -296,7 +296,7 @@ static void load_thread_state ( ThreadId tid )
    vg_assert(vg_tid_currently_in_baseBlock == VG_INVALID_THREADID);
 
    VG_(baseBlock)[VGOFF_(ldt)]  = (UInt)VG_(threads)[tid].ldt;
-   VG_(baseBlock)[VGOFF_(tls)]  = (UInt)VG_(threads)[tid].tls;
+   VG_(baseBlock)[VGOFF_(tls_ptr)]  = (UInt)VG_(threads)[tid].tls;
    VG_(baseBlock)[VGOFF_(m_cs)] = VG_(threads)[tid].m_cs;
    VG_(baseBlock)[VGOFF_(m_ss)] = VG_(threads)[tid].m_ss;
    VG_(baseBlock)[VGOFF_(m_ds)] = VG_(threads)[tid].m_ds;
@@ -383,13 +383,13 @@ static void save_thread_state ( ThreadId tid )
       syscall, in which case we will correctly be updating
       VG_(threads)[tid].tls.  This printf happens iff the following
       assertion fails. */
-   if ((void*)VG_(threads)[tid].tls != (void*)VG_(baseBlock)[VGOFF_(tls)])
-      VG_(printf)("VG_(threads)[%d].tls=%p  VG_(baseBlock)[VGOFF_(tls)]=%p\n",
+   if ((void*)VG_(threads)[tid].tls != (void*)VG_(baseBlock)[VGOFF_(tls_ptr)])
+      VG_(printf)("VG_(threads)[%d].tls=%p  VG_(baseBlock)[VGOFF_(tls_ptr)]=%p\n",
                  tid, (void*)VG_(threads)[tid].tls, 
-                       (void*)VG_(baseBlock)[VGOFF_(tls)]);
+                       (void*)VG_(baseBlock)[VGOFF_(tls_ptr)]);
 
    vg_assert((void*)VG_(threads)[tid].tls 
-             == (void*)VG_(baseBlock)[VGOFF_(tls)]);
+             == (void*)VG_(baseBlock)[VGOFF_(tls_ptr)]);
 
    VG_(threads)[tid].m_cs = VG_(baseBlock)[VGOFF_(m_cs)];
    VG_(threads)[tid].m_ss = VG_(baseBlock)[VGOFF_(m_ss)];
@@ -440,7 +440,7 @@ static void save_thread_state ( ThreadId tid )
 
    /* Fill it up with junk. */
    VG_(baseBlock)[VGOFF_(ldt)] = junk;
-   VG_(baseBlock)[VGOFF_(tls)] = junk;
+   VG_(baseBlock)[VGOFF_(tls_ptr)] = junk;
    VG_(baseBlock)[VGOFF_(m_cs)] = junk;
    VG_(baseBlock)[VGOFF_(m_ss)] = junk;
    VG_(baseBlock)[VGOFF_(m_ds)] = junk;
@@ -586,7 +586,7 @@ void VG_(scheduler_init) ( void )
    /* Copy VG_(baseBlock) state to tid_main's slot. */
    vg_tid_currently_in_baseBlock = tid_main;
    vg_tid_last_in_baseBlock = tid_main;
-   VG_(baseBlock)[VGOFF_(tls)] = (UInt)VG_(threads)[tid_main].tls;
+   VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt)VG_(threads)[tid_main].tls;
    save_thread_state ( tid_main );
 
    VG_(threads)[tid_main].stack_highest_word 
@@ -1922,7 +1922,7 @@ void do__apply_in_new_thread ( ThreadId parent_tid,
 
    /* Initialise the thread's TLS array */
    VG_(clear_TLS_for_thread)( VG_(threads)[tid].tls );
-   VG_(baseBlock)[VGOFF_(tls)] = (UInt)VG_(threads)[tid].tls;
+   VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt)VG_(threads)[tid].tls;
 
    save_thread_state(tid);
    vg_tid_last_in_baseBlock = tid;