I've finally gotten around to releasing a bit of code; nothing too exciting, but hopefully useful to someone.
First, thrqueue; a thread safe queue for pthreads applications written in C, allowing for "easy" producer-consumer threading. It's pretty much identical to Queue as found in Python, Ruby and many other languages; you enqueue things from N threads, dequeue things from M threads.
Second, pqsort; a C macro which generates partial quicksorts for arbitrary types, allowing for efficient sorting, ranking, pagination, partitioning, etc.
Both of these are used by Newzbin's backend search engine, resultd, so they've had some exercise in real world production use.