]> mj.ucw.cz Git - libucw.git/commitdiff
default_thread_stack_size -> ucwlib_thread_stack_size
authorPavel Charvat <pchar@ucw.cz>
Thu, 30 Oct 2008 09:18:04 +0000 (10:18 +0100)
committerPavel Charvat <pchar@ucw.cz>
Thu, 30 Oct 2008 09:18:04 +0000 (10:18 +0100)
images/image-test.c
ucw/sorter/array.c
ucw/threads-conf.c
ucw/threads.h
ucw/workqueue.c

index 4bf02b3992d742c997c3dc9b37c15a8c33632577..0aad5057a8ccb65d54f46d0b994f32d731179b20 100644 (file)
@@ -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++)
     {
index 4c733aa346a53e70daa0af682377411e10db5239..53505d2a47e0527bb5b7c1460f669afce5144580 100644 (file)
@@ -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);
index 368201049e951a8a356e9d2b18a07f50bae5a9a1..39a3e738998c9390058f9fc1d2cbaf6bfe31c13f 100644 (file)
 #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
   }
 };
index 5644d152ce9b6fe1fb71ce29c5de940a0e2f25da..ef00dea1af953837793e49149379ab385e8ae262 100644 (file)
@@ -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
 
index 83f81def5566ac5301360c887c630e93792429ce..2dd58c9ecfeb0b1fafd877b1202fbce8d7f93c72 100644 (file)
@@ -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++)