Skip to content

Commit 9f50c97

Browse files
committed
small fixes
1 parent 6b03ca0 commit 9f50c97

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cont.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ static ID fiber_initialize_keywords[3] = {0};
300300

301301
// We don't use the VM lock to protect the shared fiber pool because the sweep
302302
// thread needs to be able to free fibers and it can't take the VM lock.
303-
rb_nativethread_lock_t fiber_lock;
303+
static rb_nativethread_lock_t fiber_lock;
304304
#ifdef RUBY_THREAD_PTHREAD_H
305-
pthread_t fiber_pool_lock_owner;
305+
static pthread_t fiber_pool_lock_owner;
306306
#endif
307307

308308
MAYBE_UNUSED(static inline bool
@@ -861,7 +861,7 @@ fiber_pool_stack_acquire_expand(struct fiber_pool *fiber_pool)
861861
count = fiber_pool_stack_expand_count(fiber_pool);
862862

863863
// Try to expand the fiber pool again:
864-
if (RB_LIKELY((vacancy = fiber_pool_expand_and_pop(fiber_pool, false, true, count)))) {
864+
if (RB_LIKELY((vacancy = fiber_pool_expand_and_pop(fiber_pool, count, false, true)))) {
865865
return vacancy;
866866
}
867867
else {

gc/default/default.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4936,7 +4936,7 @@ gc_sweep_start(rb_objspace_t *objspace)
49364936

49374937
objspace->heaps_done_background_sweep = 0;
49384938

4939-
for (int i = HEAP_COUNT-1; i >= 0; i--) {
4939+
for (int i = 0; i < HEAP_COUNT; i++) {
49404940
rb_heap_t *heap = &heaps[i];
49414941
gc_sweep_start_heap(objspace, heap);
49424942

0 commit comments

Comments
 (0)