Skip to content

Commit baf32dc

Browse files
author
Martin Baulig
committed
2007-08-22 Martin Baulig <martin@ximian.com>
* pthread_stop_world.c (GC_mono_debugger_add_all_threads): Removed. (GC_mono_debugger_get_stack_ptr): New public function. svn path=/trunk/mono/; revision=84647
1 parent 9adb72b commit baf32dc

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

libgc/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2007-08-22 Martin Baulig <martin@ximian.com>
2+
3+
* pthread_stop_world.c
4+
(GC_mono_debugger_add_all_threads): Removed.
5+
(GC_mono_debugger_get_stack_ptr): New public function.
16

27
Wed Jul 4 17:46:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
38

libgc/include/libgc-mono-debugger.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ typedef struct
1616

1717
extern GCThreadFunctions *gc_thread_vtable;
1818

19-
extern void
20-
GC_mono_debugger_add_all_threads (void);
19+
extern void *
20+
GC_mono_debugger_get_stack_ptr (void);
2121

2222
#else
2323
#error "This header is only intended to be used by the Mono Debugger"

libgc/pthread_stop_world.c

+5-11
Original file line numberDiff line numberDiff line change
@@ -561,19 +561,13 @@ void GC_stop_init()
561561

562562
GCThreadFunctions *gc_thread_vtable = NULL;
563563

564-
void
565-
GC_mono_debugger_add_all_threads (void)
564+
void *
565+
GC_mono_debugger_get_stack_ptr (void)
566566
{
567-
GC_thread p;
568-
int i;
567+
GC_thread me;
569568

570-
if (gc_thread_vtable && gc_thread_vtable->thread_created) {
571-
for (i = 0; i < THREAD_TABLE_SZ; i++) {
572-
for (p = GC_threads[i]; p != 0; p = p -> next) {
573-
gc_thread_vtable->thread_created (p->id, &p->stop_info.stack_ptr);
574-
}
575-
}
576-
}
569+
me = GC_lookup_thread (pthread_self ());
570+
return &me->stop_info.stack_ptr;
577571
}
578572

579573
#endif

0 commit comments

Comments
 (0)