The overrun bug you found has nothing to do with threading, and it's surprising nobody ran into it before. Latest commit should fix it.
Still concerned that the system call creat() seemed not to be threadsafe. Yeah I'm not using it any more but still it should have worked. Maybe make a small threaded test program to create a few files in parallel and see what happens. Karl Dahlke
