Multithreaded qsort(3)

John-Mark Gurney gurney_j at
Sun Mar 18 05:33:12 UTC 2007

Max Laier wrote this message on Thu, Mar 15, 2007 at 18:27 +0100:
> I'd suggest to name it qsort() and put it in a separate library (not 
> necessarily named libc_mt, as I don't believe there are that many 
> functions in libc, that can actually gain from multithreading).

What happens when you attempt to link a library that uses qsort, but
isn't multi-thread safe?  You may be able to protect calls to the
library w/ a lock, but then when it calls qsort, the library would

Keeping the qsort name sounds ripe for problems down the road...

  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."

More information about the freebsd-threads mailing list