ifdef CONFIG_UCW_THREADS
# Some modules require threading
LIBS+=-lpthread
-LIBUCW_MODS+=workqueue asio fb-direct
+LIBUCW_MODS+=threads-conf workqueue asio fb-direct
LIBUCW_INCLUDES+=workqueue.h asio.h
endif
--- /dev/null
+/*
+ * The UCW Library -- Threading Helpers
+ *
+ * (c) 2006 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
+ */
+
+#include "lib/lib.h"
+#include "lib/threads.h"
+#include "lib/conf.h"
+
+uns default_thread_stack_size = 65556;
+
+static struct cf_section threads_config = {
+ CF_ITEMS {
+ CF_UNS("DefaultStackSize", &default_thread_stack_size),
+ CF_END
+ }
+};
+
+static void CONSTRUCTOR
+ucwlib_threads_conf_init(void)
+{
+ cf_declare_section("Threads", &threads_config, 0);
+}
void ucwlib_lock(void);
void ucwlib_unlock(void);
+#ifdef CONFIG_UCW_THREADS
+
+extern uns default_thread_stack_size;
+
+#endif
+
#endif