At any rate, we should just debug the real bugs and I can help you with that. Sure, where do I start? First thing that must be implemented is this THREAD_SELF macro, which I think gets the address of the current thread, correct?