From: Pavel Charvat Date: Thu, 30 Oct 2008 09:18:04 +0000 (+0100) Subject: default_thread_stack_size -> ucwlib_thread_stack_size X-Git-Tag: holmes-import~233 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=3229436bebbea2e27b4b6d93f691001ef8b66c70;p=libucw.git default_thread_stack_size -> ucwlib_thread_stack_size --- diff --git a/images/image-test.c b/images/image-test.c index 4bf02b39..0aad5057 100644 --- a/images/image-test.c +++ b/images/image-test.c @@ -198,7 +198,7 @@ test_threads(void) pthread_t threads[TEST_THREADS_COUNT - 1]; pthread_attr_t attr; if (pthread_attr_init(&attr) < 0 || - pthread_attr_setstacksize(&attr, default_thread_stack_size) < 0) + pthread_attr_setstacksize(&attr, ucwlib_thread_stack_size) < 0) ASSERT(0); for (uns i = 0; i < TEST_THREADS_COUNT - 1; i++) { diff --git a/ucw/sorter/array.c b/ucw/sorter/array.c index 4c733aa3..53505d2a 100644 --- a/ucw/sorter/array.c +++ b/ucw/sorter/array.c @@ -93,7 +93,7 @@ asort_start_threads(uns run) { // XXX: If somebody overrides the radix-sorter parameters to insane values, // he also should override the stack size to insane values. - asort_thread_pool.stack_size = default_thread_stack_size + rs_estimate_stack(); + asort_thread_pool.stack_size = ucwlib_thread_stack_size + rs_estimate_stack(); asort_thread_pool.num_threads = sorter_threads; ASORT_TRACE("Initializing thread pool (%d threads, %dK stack)", sorter_threads, asort_thread_pool.stack_size >> 10); worker_pool_init(&asort_thread_pool); diff --git a/ucw/threads-conf.c b/ucw/threads-conf.c index 36820104..39a3e738 100644 --- a/ucw/threads-conf.c +++ b/ucw/threads-conf.c @@ -11,11 +11,11 @@ #include "ucw/threads.h" #include "ucw/conf.h" -uns default_thread_stack_size = 65556; +uns ucwlib_thread_stack_size = 65556; static struct cf_section threads_config = { CF_ITEMS { - CF_UNS("DefaultStackSize", &default_thread_stack_size), + CF_UNS("DefaultStackSize", &ucwlib_thread_stack_size), CF_END } }; diff --git a/ucw/threads.h b/ucw/threads.h index 5644d152..ef00dea1 100644 --- a/ucw/threads.h +++ b/ucw/threads.h @@ -28,7 +28,7 @@ void ucwlib_unlock(void); #ifdef CONFIG_UCW_THREADS -extern uns default_thread_stack_size; +extern uns ucwlib_thread_stack_size; #endif diff --git a/ucw/workqueue.c b/ucw/workqueue.c index 83f81def..2dd58c9e 100644 --- a/ucw/workqueue.c +++ b/ucw/workqueue.c @@ -50,7 +50,7 @@ worker_pool_init(struct worker_pool *p) pthread_attr_t attr; if (pthread_attr_init(&attr) < 0 || - pthread_attr_setstacksize(&attr, p->stack_size ? : default_thread_stack_size) < 0) + pthread_attr_setstacksize(&attr, p->stack_size ? : ucwlib_thread_stack_size) < 0) ASSERT(0); for (uns i=0; i < p->num_threads; i++)