thread class patch to llvm/system for clang distcc server

Hi!
Here is the second version of my patch to support platform independent threading required by clangserver.

Cheers,
Csaba

thread.patch2 (10 KB)

This looks pretty reasonable to me, but do you really need Thread::kill? Thread killing is a very touchy subject that often just doesn’t work right in many cases (e.g. dtors in killed threads are often not run), it would be better to not depend on it.

Also, should the code in lib/System/Unix/Thread.inc call assert(0) or abort since they aren’t implemented yet (instead of being empty)?

-Chris

Here is the newest version.
The kill is for handling crashes.

Csaba

2008/8/11 Chris Lattner <clattner@apple.com>

thread.patch3 (10.1 KB)

Here is the newest version.
The kill is for handling crashes.

How does it handle crashes? I don’t understand how that is even relevant.

-Chris