-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Florian Frank wrote:
> M. Edward (Ed) Borasky wrote:
>>> $ strace -c ruby -e '1.upto(100000) {|i| i.to_s}'
>>> % time     seconds  usecs/call     calls    errors syscall
>>> ------ ----------- ----------- --------- --------- ----------------
>>> 100.00    0.000655           0    200006           sigprocmask
>>> Yeah - it called sigprocmask over 200,000 times during that 100,000
>>> iteration loop.
>>> When compiled with --disable-pthread and running the same command,
>>> rt_sigprocmask gets called 4 times.
> 
> I wonder if calling sigprocmask is the right thing to do with pthreads enabled.
> I found this in the man page of pthread_sigmask:
> 
> "The use of the sigprocmask() function is unspecified in a multi-threaded
> process."
> 
> Maybe pthread_sigmask should be used if ruby has pthreads enabled?
> 

I do believe you're right ... on my system (Gentoo Linux 2.6.22 kernel,
gcc 4.1.2 and associated libraries) the same warning also shows up in
the "sigprocmask" man page. Time to dig out "rgrep" ;).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3rsH8fKMegVjSM8RArZkAKDdXZOa0LJEWsxXy+aHD7ouU8TJbgCfRtjz
5UPz78Fz4zeJXISoQHsWWlk=
=oc+u
-----END PGP SIGNATURE-----