diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-10-14 20:41:28 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-10-14 20:41:28 +0300 |
commit | e41f8a9b7a88fa198227e510b1b7292cfc08219a (patch) | |
tree | 7378dd8437bb7600f3dce66ae28db402543f91cf /pthread_stop_world.c | |
parent | 151c88b8142ec025faaba76d2d34e7a1d178acc9 (diff) | |
download | bdwgc-e41f8a9b7a88fa198227e510b1b7292cfc08219a.tar.gz |
Use EXPECT() in checks of MAIN_THREAD bit
(refactoring)
* darwin_stop_world.c [DARWIN_DONT_PARSE_STACK] (GC_stack_range_for):
Expect (p->flags&MAIN_THREAD)==0.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* pthread_support.c (GC_set_stackbottom, GC_get_my_stackbottom,
GC_call_with_gc_active): Likewise.
* pthread_support.c [E2K] (GC_get_my_stackbottom): Avoid code
duplication (sb->reg_base=NULL).
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 254fca17..f9e78ad7 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -840,7 +840,7 @@ GC_INNER void GC_push_all_stacks(void) traced_stack_sect = traced_stack_sect->prev; } } - if ((p -> flags & MAIN_THREAD) == 0) { + if (EXPECT((p -> flags & MAIN_THREAD) == 0, TRUE)) { hi = p -> stack_end; # ifdef IA64 bs_lo = p -> backing_store_end; |