Subject: bug#7489: [coreutils] over aggressive threads in sort

From: Chen Guo <[email-masked]>
Date: Fri, 3 Dec 2010 12:18:46 -0800

Thanks Jim, that helped a lot.

I'll try out Professor Eggert's suggestion, of switching to mutexes
only at the top level merge. Of the following approaches, which would
you guys consider better practice?

1) void pointer, cast as either mutex or spinlock in lock function
2) union of mutex and spinlock, chosen in lock function

The idea is basically, in the lock function if we see the node is
MERGE_LEVEL_ROOT we'd lock the mutex either via cast or union member,
and likewise for other merge levels for spinlock.