Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 1998 19:06:03 +0100
From:      Tony Finch <fanf@demon.net>
To:        freebsd-isp@FreeBSD.ORG
Subject:   Squid 2.0 and asynchronous IO
Message-ID:  <E0zT8pf-0004kV-00@fanf.noc.demon.net>

next in thread | raw e-mail | index | archive | help
I'm trying to get Squid 2.0 (what was Squid 1.2.beta) to work with
asynchronous IO on FreeBSD at the moment, but I'm having some
problems with the its attempts to control the thread scheduling
parameters, because the functions it uses don't appear to be
implemented :-(

In order to compile it correctly, I have fiddled the appropriate
Makefile.in files to ensure that the linking is done with -pthread and
that _THREADSAFE is defined. I have also added #include <sched.h> to
aiops.c because it needs struct sched_param.

When it comes to the link stage, I get

aiops.o: In function `aio_init':
/usr/local/src/squid-2.0/src/aiops.c(.text+0x28): undefined reference to `pthread_attr_setscope'
/usr/local/src/squid-2.0/src/aiops.c(.text+0x49): undefined reference to `pthread_setschedparam'
/usr/local/src/squid-2.0/src/aiops.c(.text+0x62): undefined reference to `pthread_attr_setschedparam'

which all seem to be phantoms. The only places they are called are
in aio_init, which is only called once. The code is

    pthread_attr_init(&globattr);
    pthread_attr_setscope(&globattr, PTHREAD_SCOPE_SYSTEM);
    globsched.sched_priority = 1;
    main_thread = pthread_self();
    pthread_setschedparam(main_thread, SCHED_OTHER, &globsched);
    globsched.sched_priority = 2;
    pthread_attr_setschedparam(&globattr, &globsched);

and then a whole lot of thread creation.

I have tried commenting this stuff out which allows it to compile and
link successfully, but when it is started it gets stuck and fails to
start the dnsserver processes.

Has anyone here managed to get it to work? If not, is there anyone
here who knows how to make it work?

Any help gratefully received.

Tony.
-- 
      i7yci7yci**f.a.n.finch
                                                              fanf@demon.net
                                                        dot@dotat.at

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0zT8pf-0004kV-00>