MIT-Pthreads

MIT-Pthreads

Post by Ilyas Kes » Sun, 08 Sep 2002 06:39:43



What I also not understand is that one can also compile Mysql with
MIT-Pthreads. What is a MIT-Pthread? Where can I read more about this?

Thanks

ilyas

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

MIT-Pthreads

Post by Tod Hart » Mon, 09 Sep 2002 01:20:04



Quote:> What I also not understand is that one can also compile Mysql with
> MIT-Pthreads. What is a MIT-Pthread? Where can I read more about this?

> Thanks

> ilyas

'PThreads' is short for POSIX Threads, which is the Posix API specification
for multi-threading. Threading can be implemented in a wide variety of ways,
and an implementation of the PThreads API was done at MIT, thus 'MIT
PThreads'.

Since any PThreads implementation in theory implements the same API they
SHOULD be interchangeable. In theory... In practice no such thing is even
close to true because of various factors, but MySQL does claim to link and
run against several threads libraries.

My guess would be that you are almost always better off using whatever the
default threading is for your platform. It would require a deep knowledge of
the implementation to have any idea what linking against some other thread
library will do. At the very best you might get better performance or avoid
some bugs, at worst you get a broken or flakey and/or inefficient binary.
Leave it to experts!

> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)


> To unsubscribe, e-mail

> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

1. ./configure goes into infinite loop on mit-pthreads

MySQL

Part of configure reads:

(cd mit-pthreads; sh ./configure)

I invoked configure as so:

sh -v ./configure 2> /tmp/foo

This leaves the following at the end of /tmp/foo while its running:

./configure: mit-pthreads: No such file or directory
./configure: mit-pthreads: No such file or directory
./configure: mit-pthreads: No such file or directory
./configure: mit-pthreads: No such file or directory

If I let this go on for long enough it becomes wedged and doesn't
respond to ctrl-C (SIGINT).  It would appear to be some kind of resource
problem.  After hitting control-Z and kill %1 a couple of times, it dies,
and leaves this near the end of /tmp/foo:

/tmp/foo:./configure: mit-pthreads: No such file or directory
/tmp/foo:./configure: mit-pthreads: No such file or directory
/tmp/foo:
/tmp/foo:# IMPORTANT - do not modify LIBS past this line - this hack is the on
ly way
/tmp/foo:# I know to add the static NSS magic if we have static NSS libraries
with
/tmp/foo:# glibc - Sasha
/tmp/foo:
/tmp/foo:LDFLAGS="$LDFLAGS $OTHER_LIBC_LIB"
/tmp/foo:LIBS="$LIBS $STATIC_NSS_FLAGS"
...
/tmp/foo:  rm -f core core.* *.core &&
/tmp/foo:  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
/tmp/foo:    exit $exit_status

Apparently if the mit-pthreads directory doesn't exist, (I can't find it
in the distrubution), the line quoted at the beginning of this article
erroneously starts ./configure again and ends up in a transfinite loop.
I suggest, at a minimum, that the line reads:
(cd mit-pthreads && sh ./configure)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

2. New Zoomer User.

3. Help with FreeBSD 4.2 Native Threads (was: Compile broken: mysql-3.23.38/mit-pthreads)

4. Examples of network problems wanted :-)

5. <synopsis of the problem (one line)> no mit-pthreads directory

6. Relaying for Clients

7. Compile broken: mysql-3.23.38/mit-pthreads

8. QNX FAQ?

9. ./configure --withorwithout-mit-pthreads

10. libmysqlclient[_r].so + pthreads + gdb

11. MySql & Pthreads

12. problem with pthreads support on Darwin/MacOSX?

13. Trouble with MySQL, C, gdb, pthreads