fixed a few race conditions during thread/process termination leading to dead-locks
drwxr-xr-x - irc
drwxr-xr-x - msvc6
drwxr-xr-x - os2
drwxr-xr-x - posix
drwxr-xr-x - reactos
drwxr-xr-x - rosapps