Lines Matching refs:MY_POOL

141 #define MY_POOL (*my_poolp)  macro
306 MUTEX_LOCK(&MY_POOL.create_destruct_mutex); in S_ithread_free()
312 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex); in S_ithread_free()
339 MUTEX_LOCK(&MY_POOL.create_destruct_mutex); in S_ithread_free()
340 MY_POOL.total_threads--; in S_ithread_free()
341 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex); in S_ithread_free()
362 MUTEX_LOCK(&MY_POOL.create_destruct_mutex); in S_exit_warning()
363 veto_cleanup = (MY_POOL.total_threads > 0); in S_exit_warning()
364 warn = (MY_POOL.running_threads || MY_POOL.joinable_threads); in S_exit_warning()
365 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex); in S_exit_warning()
373 MY_POOL.running_threads, in S_exit_warning()
374 MY_POOL.joinable_threads, in S_exit_warning()
375 MY_POOL.detached_threads); in S_exit_warning()
390 return ((aTHX == MY_POOL.main_thread.interp) ? S_exit_warning(aTHX) : 0); in Perl_ithread_hook()
445 return (MY_POOL.default_stack_size); in S_good_stack_size()
459 if (MY_POOL.page_size <= 0) { in S_good_stack_size()
463 MY_POOL.page_size = sysconf(_SC_PAGESIZE); in S_good_stack_size()
465 MY_POOL.page_size = sysconf(_SC_MMAP_PAGE_SIZE); in S_good_stack_size()
467 if ((long)MY_POOL.page_size < 0) { in S_good_stack_size()
478 MY_POOL.page_size = getpagesize(); in S_good_stack_size()
481 MY_POOL.page_size = PAGESIZE; in S_good_stack_size()
483 MY_POOL.page_size = 8192; /* A conservative default */ in S_good_stack_size()
486 if (MY_POOL.page_size <= 0) { in S_good_stack_size()
487 Perl_croak(aTHX_ "PANIC: bad pagesize %" IVdf, (IV)MY_POOL.page_size); in S_good_stack_size()
491 stack_size = ((stack_size + (MY_POOL.page_size - 1)) / MY_POOL.page_size) * MY_POOL.page_size; in S_good_stack_size()
673 MUTEX_LOCK(&MY_POOL.create_destruct_mutex); in S_ithread_run()
684 MY_POOL.detached_threads--; in S_ithread_run()
686 MY_POOL.running_threads--; in S_ithread_run()
687 MY_POOL.joinable_threads++; in S_ithread_run()
690 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex); in S_ithread_run()
704 aTHX = MY_POOL.main_thread.interp; in S_ithread_run()
1114 stack_size = MY_POOL.default_stack_size;
1187 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1188 thread = S_ithread_create(aTHX_ &MY_POOL,
1236 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1237 for (thread = MY_POOL.main_thread.next;
1238 thread != &MY_POOL.main_thread;
1269 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
1344 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1345 MY_POOL.joinable_threads--;
1346 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
1452 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1463 MY_POOL.joinable_threads--;
1465 MY_POOL.running_threads--;
1466 MY_POOL.detached_threads++;
1470 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
1617 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1618 for (thread = MY_POOL.main_thread.next;
1619 thread != &MY_POOL.main_thread;
1636 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
1673 stack_size = MY_POOL.default_stack_size;
1695 old_size = MY_POOL.default_stack_size;
1696 MY_POOL.default_stack_size = S_good_stack_size(aTHX_ SvIV(ST(1)));
1877 MUTEX_INIT(&MY_POOL.create_destruct_mutex);
1878 MUTEX_LOCK(&MY_POOL.create_destruct_mutex);
1882 MY_POOL.tid_counter = 1;
1884 MY_POOL.default_stack_size = THREAD_CREATE_NEEDS_STACK;
1891 MUTEX_INIT(&MY_POOL.main_thread.mutex);
1894 MY_POOL.main_thread.next = &MY_POOL.main_thread;
1895 MY_POOL.main_thread.prev = &MY_POOL.main_thread;
1897 MY_POOL.main_thread.count = 1; /* Immortal */
1899 MY_POOL.main_thread.interp = aTHX;
1900 MY_POOL.main_thread.state = PERL_ITHR_DETACHED; /* Detached */
1901 MY_POOL.main_thread.stack_size = MY_POOL.default_stack_size;
1903 MY_POOL.main_thread.thr = GetCurrentThreadId();
1905 MY_POOL.main_thread.thr = pthread_self();
1908 S_ithread_set(aTHX_ &MY_POOL.main_thread);
1909 MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);