From ddc42a096876e216b6ac01950dc286528d56aa3a Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Thu, 2 Feb 2006 16:48:33 +0100 Subject: [PATCH] Version 0.61 - reduce per thread stack from 8MB to 64kB (strange pthread_create() defaults..) --- ChangeLog | 3 +++ configure | 20 ++++++++++---------- configure.in | 4 ++-- src/main.c | 10 +++++++--- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee6b944..a8f8eac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* Sun 05 June 2005 Olaf Rempel 0.61 +- reduce per thread stack from 8MB to 64kB (strange pthread_create() defaults..) + * Sun 15 May 2005 Olaf Rempel 0.60 - added receive-queue - changed plugin_helper api from void* to uint offsets diff --git a/configure b/configure index d30702a..fe30272 100644 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for hlswmaster 0.60. +# Generated by GNU Autoconf 2.59 for hlswmaster 0.61. # # Report bugs to >. # @@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='hlswmaster' PACKAGE_TARNAME='hlswmaster' -PACKAGE_VERSION='0.60' -PACKAGE_STRING='hlswmaster 0.60' +PACKAGE_VERSION='0.61' +PACKAGE_STRING='hlswmaster 0.61' PACKAGE_BUGREPORT='Olaf Rempel ' # Factoring default headers for most tests. @@ -953,7 +953,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures hlswmaster 0.60 to adapt to many kinds of systems. +\`configure' configures hlswmaster 0.61 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1019,7 +1019,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of hlswmaster 0.60:";; + short | recursive ) echo "Configuration of hlswmaster 0.61:";; esac cat <<\_ACEOF @@ -1160,7 +1160,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -hlswmaster configure 0.60 +hlswmaster configure 0.61 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1174,7 +1174,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by hlswmaster $as_me 0.60, which was +It was created by hlswmaster $as_me 0.61, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1818,7 +1818,7 @@ fi # Define the identity of the package. PACKAGE=hlswmaster - VERSION=0.60 + VERSION=0.61 cat >>confdefs.h <<_ACEOF @@ -21419,7 +21419,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by hlswmaster $as_me 0.60, which was +This file was extended by hlswmaster $as_me 0.61, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21482,7 +21482,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -hlswmaster config.status 0.60 +hlswmaster config.status 0.61 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.in b/configure.in index d0ba004..61659de 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ dnl projekname, version, bugsto -AC_INIT(hlswmaster, 0.60, [Olaf Rempel ]) +AC_INIT(hlswmaster, 0.61, [Olaf Rempel ]) dnl same for automake -AM_INIT_AUTOMAKE(hlswmaster, 0.60) +AM_INIT_AUTOMAKE(hlswmaster, 0.61) dnl do not rebuild configure AM_MAINTAINER_MODE diff --git a/src/main.c b/src/main.c index 1238a53..693ee0f 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,7 @@ static struct option opts[] = { int main(int argc, char *argv[]) { pthread_t thread1, thread2, thread3; + pthread_attr_t attr; int arg = 0, code = 0, debug = 0; char *config = NULL, *user = NULL, *logfile; @@ -118,9 +119,12 @@ int main(int argc, char *argv[]) plugin_load_all(); /* startup threads */ - pthread_create(&thread1, NULL, (void *)&scan_control, NULL); - pthread_create(&thread2, NULL, (void *)&scan_receive, NULL); - pthread_create(&thread3, NULL, (void *)&client_handler, NULL); + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 65536); + + pthread_create(&thread1, &attr, (void *)&scan_control, NULL); + pthread_create(&thread2, &attr, (void *)&scan_receive, NULL); + pthread_create(&thread3, &attr, (void *)&client_handler, NULL); /* wait untill d00msday */ while (1)